Me trying to play music without play_sound()

Just a little experiment of mine with the Be API. It’s a command-line music player (…ish).

One thing I find intriguing - MediaPlayer cannot seek or keep track of location in an Opus or FLAC file, although Vorbis and MP3 works fine. Interestingly, my test app (which uses BMediaTrack) seeks the problematic Opus files perfectly. I’m wondering if I should file a bug report…

3 Likes

MediaPlayer is extremely over-engineered, yes. It also tries to seek via the video track instead of the audio track, IIRC, which obviously does not work so well on audio files that have a 1-frame “video track” (album art.)

1 Like

In the media kit each track is independant and you have to seek both and keep them in sync.

The problem with 1frame video track is, as far as I can tell, related to MediaPlayer trying to get at least 2 frames to compute a framerate, or something like that, and probably just a missing error check. The problem is, with all the framework code around it, no one took the time to add that error check yet.

Oh yes! The album art! That’s probably the real reason seeking glitched!

MediaPlayer is extremely overengineered

That’s actually the main inspiration behind this project. I tried to grok its code for fun, and it’s so complicated it felt like a library should be factored out of it… BeOS already provides that library.

Now, to find a way to debug MediaPlayer

Hi,

I have compiled your software and mp3 work but I have an error at the ending
(Invalid return 0 value for stream protocol)

Do you have an issue about it?