Changeset 5333:15e7ba78b961 in roaraudio


Ignore:
Timestamp:
12/08/11 20:05:49 (11 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

cleanup and usage of const

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • include/libroardsp/fader.h

    r5270 r5333  
    5050}; 
    5151 
    52 int roar_fader_init         (struct roar_fader_state * state, float * poly, int coeff); 
     52int roar_fader_init         (struct roar_fader_state * state, const float * poly, int coeff); 
    5353int roar_fader_set_rate     (struct roar_fader_state * state, int rate); 
    5454int roar_fader_set_startstop(struct roar_fader_state * state, ssize_t start, ssize_t stop); 
  • libroardsp/fader.c

    r4708 r5333  
    2929#define _CHECK_CALCPCM() _CHECK_BASIC(); if ( frames == 0 ) return 0; if ( data == NULL ) return -1; 
    3030 
    31 int roar_fader_init         (struct roar_fader_state * state, float * poly, int coeff) { 
     31int roar_fader_init         (struct roar_fader_state * state, const float * poly, int coeff) { 
    3232 _CHECK_BASIC(); 
    3333 
  • roard/include/ssynth.h

    r5194 r5333  
    5050#define SSYNTH_POLY_COEFF            4 
    5151 
    52 extern float ssynth_polys[SSYNTH_POLY_POLYMAX][SSYNTH_POLY_COEFF]; 
    53  
    5452extern struct ssynth_conf { 
    5553 int enable; 
    5654} ssynth_conf; 
    57  
    58 extern struct ssynth_state { 
    59  int stream; 
    60  struct { 
    61   int stage; 
    62   char vv_down, vv_up; 
    63   struct roar_note_octave   note; 
    64   struct roar_synth_state   synth; 
    65   struct roar_fader_state   fader; 
    66   struct roar_buffer      * buf; 
    67  } notes[SSYNTH_NOTES_MAX]; 
    68 } g_ssynth; 
    6955 
    7056int ssynth_init_config(void); 
  • roard/ssynth.c

    r5301 r5333  
    2828#ifndef ROAR_WITHOUT_DCOMP_SSYNTH 
    2929 
    30 float ssynth_polys[SSYNTH_POLY_POLYMAX][SSYNTH_POLY_COEFF] = { 
     30static const float ssynth_polys[SSYNTH_POLY_POLYMAX][SSYNTH_POLY_COEFF] = { 
    3131       {0.300000,  0.958333, -0.550000,  0.091667}, 
    3232       {0.700010, -0.083333, -0.150000,  0.033333} 
     
    3535struct ssynth_conf ssynth_conf; 
    3636 
    37 struct ssynth_state g_ssynth; 
     37struct ssynth_state { 
     38 int stream; 
     39 struct { 
     40  int stage; 
     41  char vv_down, vv_up; 
     42  struct roar_note_octave   note; 
     43  struct roar_synth_state   synth; 
     44  struct roar_fader_state   fader; 
     45  struct roar_buffer      * buf; 
     46 } notes[SSYNTH_NOTES_MAX]; 
     47} g_ssynth; 
    3848 
    3949int ssynth_init_config(void) { 
Note: See TracChangeset for help on using the changeset viewer.