Midiman Audiophile 2496: App output format (Linux)
Reply #2 – 2005-10-29 17:55:59
Most Linux players will send 16 bit data to the soundcard for 16 bit material and 24 bit data for 24 bit marterial. Where the soundcard's native format differs from what an application sends, ALSA converts to the target format. On my card, playing 24 bit material, mplayer sends 24 bit samples to ALSA and ALSA sends S32_LE data to the card (which is the only format the ICE1712 supports). You can force the format that ALSA sends to the sound card by editing your .asoundrc. I recommend you do this with KAsound , if you have KDE. [a href="index.php?act=findpost&pid=338049"][{POST_SNAPBACK}][/a] Thanks! I ran a few tests with aplay and a wav file and it seems in the end s32_le is used when I choose the default pcm device. aplay tells me it's using 24 msbits. So I think that means 24 bits per sample and therefore it's not really s32_le but 24bits padded to 32bits like in fb2k. I actually use an ~/.asoundrc file that sets up the softvol plugin. But I wrote it in a way that it still uses the default plughw pcm device that is provided by alsa, so I don't have to specify s32_le (checked that with aplay also). In case you're interested:pcm.softvol { type softvol slave { pcm "plughw:0,0" } control { name PCM card 0 } } I'm just wondering because in the fb2k case the media player itself changes the format to s32_le (24 bit padded to 32 bit anyway). And because people write about not needing to dither when using s32_le I asked myself if I should somehow tell mplayer and other players to do the same. I'm not sure on this one, yet :-) I mean fb2k uses my direct sound device. The way I see it the direct sound device is something like ALSA. So I assume that direct sound also changes the format to s32_le. And then why does fb2k have anything to do with changing the format if direct sound does it anyway? If there's a point doing the format conversion in fb2k it should also be valid for other players, even in Linux. Probably I just don't get it (admittedly I know very little about this format business). If you guys could be so kind to clear that up I'll be happy :-) Thanks mic