Mercurial > mplayer.hg
comparison libmpcodecs/ad_dmo.c @ 25315:dfa8a510c81c
Fix all current known multi-channel wrong order problems by adding
common functions for channel reordering.
This fixes these modules by adding channel reordering code for 5.0/5.1 audio:
ao: pcm
ad: dmo, faad, ffmpeg(ac3, dca, libfaad, liba52), pcm
ae: faac, lavc(ac3, libfaac), pcm
author | ulion |
---|---|
date | Mon, 10 Dec 2007 16:53:30 +0000 |
parents | f29d31547c31 |
children | 0f1b5b68af32 |
comparison
equal
deleted
inserted
replaced
25314:02e2e7a5599a | 25315:dfa8a510c81c |
---|---|
5 #include "config.h" | 5 #include "config.h" |
6 #include "mp_msg.h" | 6 #include "mp_msg.h" |
7 #include "help_mp.h" | 7 #include "help_mp.h" |
8 | 8 |
9 #include "ad_internal.h" | 9 #include "ad_internal.h" |
10 #include "libaf/reorder_ch.h" | |
10 | 11 |
11 static ad_info_t info = | 12 static ad_info_t info = |
12 { | 13 { |
13 "Win32/DMO decoders", | 14 "Win32/DMO decoders", |
14 "dmo", | 15 "dmo", |
92 sh_audio->a_in_buffer_len=0; | 93 sh_audio->a_in_buffer_len=0; |
93 } else { | 94 } else { |
94 sh_audio->a_in_buffer_len-=size_in; | 95 sh_audio->a_in_buffer_len-=size_in; |
95 memmove(sh_audio->a_in_buffer,&sh_audio->a_in_buffer[size_in],sh_audio->a_in_buffer_len); | 96 memmove(sh_audio->a_in_buffer,&sh_audio->a_in_buffer[size_in],sh_audio->a_in_buffer_len); |
96 } | 97 } |
98 if (size_out > 0 && sh_audio->channels >= 5) { | |
99 reorder_channel_nch(buf, AF_CHANNEL_LAYOUT_WAVEEX_DEFAULT, | |
100 AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT, | |
101 sh_audio->channels, | |
102 size_out / sh_audio->samplesize, | |
103 sh_audio->samplesize); | |
104 } | |
97 // len=size_out; | 105 // len=size_out; |
98 return size_out; | 106 return size_out; |
99 } | 107 } |