deltabeard / ctrmus

3DS Music Player

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Playing high bitrate & high sampling rate files

Hackerpcs opened this issue · comments

I've tested some file types and it can play MP3 V2 and 320 constant and from FLAC it can play
16bit/44,1KHz
16bit/88,2KHz
24bit/44,1KHz
24bit/48KHz

but playback stops with

24bit/88,2KHz
24bit/96KHz
24bit/176,4KHz
24bit/192KHz

It would be nice if it could play last 4 sets.

Is there an error message displayed when playing the latter four configurations?

This is most likely a limitation with the codecs used for mp3 (libmpg123) and flac (dr_flac). Support for these configurations may be added with ffmpeg - if that ever gets added.

It starts playing with some audible distortion and it stops (just "Stopping playback" like pressing stop) after some seconds.

MP3 only supports up to 48KHz sample rate [1], so I'm assuming you're referring to flac for the higher sampling rates.
At least on commit 295edd0 , a 24bit/96KHz flac plays well, whereas 192kHz is awful. I'm not sure about 176.4KHz, and I'm assuming that 88.2KHz would work fine if 96KHz is.
In fact, browsing the GUI whilst a 192KHz flac is playing is extremely slow which is quite amusing. Shoving the playback thread to the second core (of which we only get 30% time) is even worse as some opus files begin to play slowly.

This is the build I am testing (built from commit 295edd0) ctrmus.zip; it may have fixed playback for some of the formats you listed.

Whilst there doesn't seem to be a fix for 24bit 192KHz playback, supporting it is rather out of the scope of this project. The DSP in the 3DS is 16bit maximum, so there isn't much point supporting >16bit unless if it saves you from re-encoding music.

Either way, let me know how it goes. 😃

I haven't tested .flac yet, but it seems that at 48KHz/32bit on .wavs, I get error 1001. I bet .flacs would do the same. It's not very likely that someone would be using .wavs but still. I downloaded a lot from Soundcloud and I have a lot of .wavs to re-encode for them to work