You are not logged in.

#1 2020-06-29 12:50:53

freezeheat
Member
Registered: 2020-03-12
Posts: 11

ALSA and the m4a codec

I use ALSA in my system, after changes to the buffer ring to reduce hardware interrupts I found that the m4a codec specifically doesn't work with some values.

Before:

rate 48000
period_time 0 
period_size 1024 
buffer_size 8192

This essentially meant that a stereo, 16bit @ 48Khz stream (bps 192000) with the above period size, 192000 / (1024 * 4) = 46.875 interrupts/sec.
m4a codec @ youtube worked perfectly with this configuration.

After:

rate 48000
period_time 0 
period_size 4096
buffer_size 65535

stereo, 16bit @ 48Khz stream (bps 192000) with the above period size, 192000 / (4096 * 4) = 11.71875 interrupts/sec.
m4a codec @ youtube doesn't play any audio anymore (VP8/9 worked well).

Compromise:

rate 48000
period_time 0 
period_size 2048
buffer_size 32768

NOTE: only period_size affected the m4a codec, the buffer shouldn't and didn't change that in my case.

I don't know exactly why, it's probably upmixing/downmixing or just a limit set by the m4a codec, any ideas?

[EDIT]
I also found problems with SoundCloud, which was attributed to Firefox not supporting ALSA anymore..
I've installed PulseAudio and moved on, it's unfortunate but many use it instead.

Last edited by freezeheat (2020-07-03 23:17:10)

Offline

Board footer

Powered by FluxBB