Demuxing MPEG audio

Forum for discussing issues with the 64bit version of kJams
Post Reply
dennisgsy
Posts: 30
Joined: Sat Sep 12, 2009 1:23 pm
Location: Guernsey, Channel Islands

Demuxing MPEG audio

Post by dennisgsy »

My Test #013 / upgraded to KJAMS Pro 1.1b40 before testing - whilst not necessarily a bug it can cause about a 2 minute delay before the track starts playing. If this happened in a live venue the delay will be a problem.

I doubled-clicked to play tracks from my favourites list. Some play immediately and some take up to 2 minutes while the "Demuxing MPEG audio" message is displayed. Once they have played once the delay seems to have been eliminated when played again.

I've revealed tracks in finder; one is a zip file containing a CDG and MP3, another is saved as CDG and PCM so the saved format doesn't appear to be the cause.
I closed KJAMS and relaunched and no repeat on the previously troublesome tracks but one I had played last time delayed "Love is all around" saved as CDG and PCM.
Attachments
Screenshot 2021-07-19 at 09.29.25.png
Screenshot 2021-07-19 at 09.12.47.png
Screenshot 2021-07-19 at 08.58.32.png
Screenshot 2021-07-19 at 08.56.34.png

dave
Site Admin
Posts: 6684
Joined: Sun Sep 18, 2005 8:02 am
Location: Seattle
Contact:

Re: Demuxing MPEG audio

Post by dave »

okay a couplla things going on here:
one is, it is good to understand the "cache"
when kJams plays a song, it "unpacks" it to PCM, storing it in the cache. PCM is the uncompressed version of the audio track. You can literally take the PCM file and pipe it to the speakers instantly, no decoding necessary. but the cache is ephemeral, it may disappear at any time, and the default is it holds only 20 songs in a FIFO queue (old songs get deleted to make room for new songs). so while it may SEEM those songs "play fine after playing once", then after playing 20 more songs, that first song will need to "demux" again (decompress / decode).
two: you should always have "pre-cache next song" (prefs->general) turned on. that way there is never a delay to play songs, except for the first song of the night.
three: you can "clear cache" (prefs->audio) to do a fair test. eg: on that song that took 2 minutes? what is the file format of that song?

joachimschmidt
Posts: 112
Joined: Sun May 23, 2021 12:49 pm

Re: Demuxing MPEG audio

Post by joachimschmidt »

bumping this issue.

Is this demuxing required? I can't remember it used to be that way, and other players don't ...
Or can it be done in real time, hence not waiting for complete conversion before start?
pre-cache doesn't work if i don't use playlist but rather choose songs on the fly. Or when you want to hear the beginning of a few different versions of a song.

dave
Site Admin
Posts: 6684
Joined: Sun Sep 18, 2005 8:02 am
Location: Seattle
Contact:

Re: Demuxing MPEG audio

Post by dave »

You absolutely do have to decode the audio in order to play it. In the past it happened in real time, or faster than real time so that the song could start playing immediately while the cache was not even filled yet.

This is currently a stopgap until I can get real time decoding going, trust me I’m working on it

joachimschmidt
Posts: 112
Joined: Sun May 23, 2021 12:49 pm

Re: Demuxing MPEG audio

Post by joachimschmidt »

Thank You! :-)

dave
Site Admin
Posts: 6684
Joined: Sun Sep 18, 2005 8:02 am
Location: Seattle
Contact:

Re: Demuxing MPEG audio

Post by dave »

8)

Post Reply