Changeset 0c0c679545f62b3dcfe039859b00be6cdb0da938
- Timestamp:
- 23/08/06 23:59:47
(2 years ago)
- Author:
- Jean-Paul Saman <jpsaman@videolan.org>
- git-committer:
- Jean-Paul Saman <jpsaman@videolan.org> 1156370387 +0000
- git-parent:
[0acc11b0549c3ccf237d2b4422e9a8282922adbe]
- git-author:
- Jean-Paul Saman <jpsaman@videolan.org> 1156370387 +0000
- Message:
put mono audio in both (left/right) channels. For some reason AOUT_CHAN_CENTER doesn't work. Somebody explain this to me, please.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r10e3212 |
r0c0c679 |
|
| 143 | 143 | #if 0 |
|---|
| 144 | 144 | p_filter->fmt_out.audio.i_physical_channels = AOUT_CHAN_CENTER; |
|---|
| 145 | | #endif |
|---|
| | 145 | #else |
|---|
| 146 | 146 | p_filter->fmt_out.audio.i_physical_channels = |
|---|
| 147 | 147 | (AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT); |
|---|
| 148 | | |
|---|
| | 148 | #endif |
|---|
| 149 | 149 | p_filter->fmt_out.audio.i_rate = p_filter->fmt_in.audio.i_rate; |
|---|
| 150 | 150 | p_filter->fmt_out.audio.i_format = p_filter->fmt_out.i_codec; |
|---|
| … | … | |
| 262 | 262 | for( n = 0; n < (p_input->i_nb_samples * p_sys->i_nb_channels); n++ ) |
|---|
| 263 | 263 | { |
|---|
| 264 | | if( (n%p_sys->i_nb_channels) == p_sys->i_channel_selected ) |
|---|
| 265 | | { |
|---|
| 266 | | p_out[n] = (p_in[n] + p_in[n+1]) >> 1; |
|---|
| 267 | | } |
|---|
| 268 | | else |
|---|
| 269 | | { |
|---|
| 270 | | p_out[n] = 0x0; |
|---|
| 271 | | } |
|---|
| | 264 | /* Fake real mono. */ |
|---|
| | 265 | p_out[n] = (p_in[n] + p_in[n+1]) >> 1; |
|---|
| | 266 | n++; |
|---|
| 272 | 267 | } |
|---|
| 273 | 268 | return n; |
|---|