summaryrefslogtreecommitdiff
path: root/apps/dsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dsp.c')
-rw-r--r--apps/dsp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/dsp.c b/apps/dsp.c
index f7eb48ed03..533342ecf1 100644
--- a/apps/dsp.c
+++ b/apps/dsp.c
@@ -128,7 +128,7 @@ void sound_set_pitch(int permille)
128{ 128{
129 pitch_ratio = permille; 129 pitch_ratio = permille;
130 130
131 dsp_configure(DSP_SWITCH_FREQUENCY, (int *)dsp->codec_frequency); 131 dsp_configure(DSP_SWITCH_FREQUENCY, dsp->codec_frequency);
132} 132}
133 133
134/* Convert at most count samples to the internal format, if needed. Returns 134/* Convert at most count samples to the internal format, if needed. Returns
@@ -844,7 +844,7 @@ int dsp_stereo_mode(void)
844 return dsp->stereo_mode; 844 return dsp->stereo_mode;
845} 845}
846 846
847bool dsp_configure(int setting, void *value) 847bool dsp_configure(int setting, intptr_t value)
848{ 848{
849 dsp = &dsp_conf[current_codec]; 849 dsp = &dsp_conf[current_codec];
850 850
@@ -855,7 +855,7 @@ bool dsp_configure(int setting, void *value)
855 sizeof(struct resample_data)); 855 sizeof(struct resample_data));
856 /* Fall through!!! */ 856 /* Fall through!!! */
857 case DSP_SWITCH_FREQUENCY: 857 case DSP_SWITCH_FREQUENCY:
858 dsp->codec_frequency = ((long) value == 0) ? NATIVE_FREQUENCY : (long) value; 858 dsp->codec_frequency = (value == 0) ? NATIVE_FREQUENCY : value;
859 /* Account for playback speed adjustment when setting dsp->frequency 859 /* Account for playback speed adjustment when setting dsp->frequency
860 if we're called from the main audio thread. Voice UI thread should 860 if we're called from the main audio thread. Voice UI thread should
861 not need this feature. 861 not need this feature.
@@ -868,15 +868,15 @@ bool dsp_configure(int setting, void *value)
868 break; 868 break;
869 869
870 case DSP_SET_CLIP_MIN: 870 case DSP_SET_CLIP_MIN:
871 dsp->clip_min = (long) value; 871 dsp->clip_min = value;
872 break; 872 break;
873 873
874 case DSP_SET_CLIP_MAX: 874 case DSP_SET_CLIP_MAX:
875 dsp->clip_max = (long) value; 875 dsp->clip_max = value;
876 break; 876 break;
877 877
878 case DSP_SET_SAMPLE_DEPTH: 878 case DSP_SET_SAMPLE_DEPTH:
879 dsp->sample_depth = (long) value; 879 dsp->sample_depth = value;
880 880
881 if (dsp->sample_depth <= NATIVE_DEPTH) 881 if (dsp->sample_depth <= NATIVE_DEPTH)
882 { 882 {
@@ -887,10 +887,10 @@ bool dsp_configure(int setting, void *value)
887 } 887 }
888 else 888 else
889 { 889 {
890 dsp->frac_bits = (long) value; 890 dsp->frac_bits = value;
891 dsp->sample_bytes = 4; /* samples are 32 bits */ 891 dsp->sample_bytes = 4; /* samples are 32 bits */
892 dsp->clip_max = (1 << (long)value) - 1; 892 dsp->clip_max = (1 << value) - 1;
893 dsp->clip_min = -(1 << (long)value); 893 dsp->clip_min = -(1 << value);
894 } 894 }
895 895
896 dither_init(); 896 dither_init();