Mercurial > mplayer.hg
comparison libao2/pl_delay.c @ 14245:815f03b7cee5
removing AFMT_ dependancy
author | alex |
---|---|
date | Mon, 27 Dec 2004 17:30:15 +0000 |
parents | 6e35326c742f |
children |
comparison
equal
deleted
inserted
replaced
14244:9b03ad0254ae | 14245:815f03b7cee5 |
---|---|
10 #include <string.h> | 10 #include <string.h> |
11 | 11 |
12 #include "audio_out.h" | 12 #include "audio_out.h" |
13 #include "audio_plugin.h" | 13 #include "audio_plugin.h" |
14 #include "audio_plugin_internal.h" | 14 #include "audio_plugin_internal.h" |
15 #include "afmt.h" | 15 #include "libaf/af_format.h" |
16 | 16 |
17 static ao_info_t info = | 17 static ao_info_t info = |
18 { | 18 { |
19 "Delay audio plugin", | 19 "Delay audio plugin", |
20 "delay", | 20 "delay", |
63 pl_delay.channels=ao_plugin_data.channels; //1=mono 2=stereo | 63 pl_delay.channels=ao_plugin_data.channels; //1=mono 2=stereo |
64 pl_delay.format=ao_plugin_data.format; | 64 pl_delay.format=ao_plugin_data.format; |
65 | 65 |
66 // Tell ao_plugin how much this plugin adds to the overall time delay | 66 // Tell ao_plugin how much this plugin adds to the overall time delay |
67 time_delay=-1*(float)ao_plugin_cfg.pl_delay_len/((float)pl_delay.channels*(float)pl_delay.rate); | 67 time_delay=-1*(float)ao_plugin_cfg.pl_delay_len/((float)pl_delay.channels*(float)pl_delay.rate); |
68 if(pl_delay.format != AFMT_U8 && pl_delay.format != AFMT_S8) | 68 if(pl_delay.format != AF_FORMAT_U8 && pl_delay.format != AF_FORMAT_S8) |
69 time_delay/=2; | 69 time_delay/=2; |
70 ao_plugin_data.delay_fix+=time_delay; | 70 ao_plugin_data.delay_fix+=time_delay; |
71 | 71 |
72 // Create buffer for the delayed data | 72 // Create buffer for the delayed data |
73 pl_delay.delay=(void*)malloc(ao_plugin_cfg.pl_delay_len); | 73 pl_delay.delay=(void*)malloc(ao_plugin_cfg.pl_delay_len); |