Identify the left and right channels

OSS specific Linux discussion (x86/amd64)

Moderators: cesium, dev, kodachi, hannu

Identify the left and right channels

Postby JawadRehman » Thu Feb 03, 2011 12:22 pm

I am working on OOS to implement mp3 player. How it is possible to identify the left and right channels from the data read from the sound card . Presently i am operating the sound card in stero mode.
JawadRehman
New Member
 
Posts: 1
Joined: Thu Feb 03, 2011 12:16 pm

Re: Identify the left and right channels

Postby igorzwx » Thu Feb 03, 2011 12:46 pm

JawadRehman wrote:I am working on OOS to implement mp3 player. How it is possible to identify the left and right channels from the data read from the sound card . Presently i am operating the sound card in stero mode.


OSS is already implemented in the Russian Ultimate Music Player For GNU/Linux
http://deadbeef.sourceforge.net/

It is "open source". Perhaps, you may borrow some code.

Notice that the player is "ultimate". It seems to mean that it is impossible to make anything better. Although, it might be possible to improve the OSS plugin.
igorzwx
Known Member
 
Posts: 1001
Joined: Sun Jun 28, 2009 9:31 pm

Re: Identify the left and right channels

Postby cesium » Thu Feb 03, 2011 5:43 pm

IIRC, OSS input data is interleaved, so every even index (starting from zero, of course) input is left channel and every odd index input is right channel.
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am


Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest

cron