Lines 211-222
Link Here
|
211 |
} |
211 |
} |
212 |
} |
212 |
} |
213 |
|
213 |
|
|
|
214 |
float artsd_get_internal_volume(); |
215 |
|
214 |
static void artsd_write_audio(gpointer data,gint length) |
216 |
static void artsd_write_audio(gpointer data,gint length) |
215 |
{ |
217 |
{ |
216 |
int errorcode; |
218 |
int errorcode; |
217 |
AFormat new_format; |
219 |
AFormat new_format; |
218 |
gint new_frequency,new_channels; |
220 |
gint new_frequency,new_channels; |
219 |
EffectPlugin *ep; |
221 |
EffectPlugin *ep; |
|
|
222 |
short *samples = (short*)data; |
223 |
gint i; |
224 |
float volume = artsd_get_internal_volume(); |
220 |
|
225 |
|
221 |
new_format = input_format; |
226 |
new_format = input_format; |
222 |
new_frequency = input_frequency; |
227 |
new_frequency = input_frequency; |
Lines 242-247
Link Here
|
242 |
if(effects_enabled() && ep && ep->mod_samples) |
247 |
if(effects_enabled() && ep && ep->mod_samples) |
243 |
length = ep->mod_samples(&data,length, input_format, input_frequency, input_channels); |
248 |
length = ep->mod_samples(&data,length, input_format, input_frequency, input_channels); |
244 |
|
249 |
|
|
|
250 |
for (i = 0; i < (length / 2); i++) |
251 |
samples[i] *= volume * volume; |
252 |
|
245 |
errorcode = arts_write(stream,artsd_translate(data,length),length); |
253 |
errorcode = arts_write(stream,artsd_translate(data,length),length); |
246 |
if(errorcode < 0) |
254 |
if(errorcode < 0) |
247 |
fprintf(stderr,"arts_write error: %s\n",arts_error_text(errorcode)); |
255 |
fprintf(stderr,"arts_write error: %s\n",arts_error_text(errorcode)); |