Old 13th November 2014, 01:12   #1
thinktink
Forum King
 
thinktink's Avatar
 
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 3,009
Send a message via Skype™ to thinktink
Audio channel down-mixing.

This question is for any Winamp developers (current or former) that dealt with the SHOUTcast DSP audio processing.

I would like to know what resource that any of y'all used to determine how to convert multichannel (3 channels or greater) audio to stereo for going into the DSP from the input plugin. I'm considering integrating resampling and channel down-mixing into XFade and I would like to do it the same as the SHOUTcast DSP for consistent results and because I'm just guessing here based on various Google search results at the moment.

Last edited by thinktink; 13th November 2014 at 01:13. Reason: spelling
thinktink is offline   Reply With Quote
Old 13th November 2014, 01:39   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
the Source DSP doesn't do anything specific (hence why it fails in 24-bit mode) and just goes against what the Winamp core is providing to it (which it assumes will be stereo or maybe mono). i'm not quite sure what you're looking for as i've never looked at the actual playback core / conversion stuff that Winamp does.
DrO is offline   Reply With Quote
Old 13th November 2014, 01:42   #3
thinktink
Forum King
 
thinktink's Avatar
 
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 3,009
Send a message via Skype™ to thinktink
Does it also fail if an input plugin provides more than 3 channels or does it just throw away all channels except Left and Right?
thinktink is offline   Reply With Quote
Old 13th November 2014, 01:47   #4
DrO
 
Join Date: Sep 2003
Posts: 27,873
i've never tried it with a multi-channel file seeing as no streams need it so i don't know what it'll do (though i don't remember anything in the code that'd do any down-mixing, etc in the DSP).
DrO is offline   Reply With Quote
Old 13th November 2014, 04:17   #5
thinktink
Forum King
 
thinktink's Avatar
 
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 3,009
Send a message via Skype™ to thinktink
So I just did some tests on the Source DSP. It sounds like it could use some multi-channel audio down-mixing and a better sample rate converter.

At first I thought it was my encoder plugin at fault (I was testing with some opus files I just happened to have in my playlist from testing my last round of opus support plugin development) but when changing the bitrate upwards didn't help I decided to listen locally and it sounded fine. I heard some harmonic distortion with simple audio (like a single tubular bell or piano solo at the end of a song.)

When I played a multi-channel audio file, it crapped out. It didn't crash but it made sc_trans go crazy on the cpu and it sounds like a byte misaligned audio track that's been time stretched (but it still only plays for the length of the file's actual playback time) like an audio file sampled at 44.1k but played at 22.05k.
thinktink is offline   Reply With Quote
Old 13th November 2014, 13:06   #6
DrO
 
Join Date: Sep 2003
Posts: 27,873
as I said it doesn't do any down mixing and resampling is most likely down to what the encoder plug-ins are doing or even the Winamp core as the plug-in doesn't do any if it either. so I'm not at all surprised its not working correctly with your tests since it was never designed to work in such a scenario (as no one uses it like it from what csn be told) and tbh I don't think it'll be changed to do so anytime soon / at all - its just a basic way to get broadcasting and using winamp as a formal broadcasting solution is not what its designed to do.
DrO is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Tags
channel, down-mixing

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump