Page 1 of 2

playing mp3 via datatypes doesn't work under MOS

Posted: Wed Mar 04, 2015 1:28 am
by p-OS
I tried to test the new Loader option of Hollywood 6.0.
My System is running MorphOS 3.7

my code:

Code: Select all

liad=OpenMusic(nil,"Raoui.mp3",{Loader="native"})
PlayMusic(liad)                                     
Documentation says, "native" results in using the Datytypes system under Amiga like OS.

At runtime I get an error message like: sound file ""Raoui.mp3" has unknown format


When I open the same file with multiview it is recognized and played correctly. Thus mp3.datatype (delivered with MorphOS by default) works and MP3 file is ok , too.

Hmm, what's going wrong ?

Re: playing mp3 via datatypes doesn't work under MOS

Posted: Wed Mar 04, 2015 7:47 pm
by airsoftsoftwair
The problem is that neither the original C= nor the Haage&Partner sound.datatype implementation supports streaming. Only MorphOS' sound.datatype comes with an extension for streaming but this is not supported on any of the other platforms. I'll consider adding support for this MorphOS extension for the next update, though. It shouldn't be very difficult to add.

Re: playing mp3 via datatypes doesn't work under MOS

Posted: Fri Mar 06, 2015 5:48 pm
by p-OS
That means:
1. When Hollywood loads sound via sound.datatype, it always presumes that complete sound will be delivered in "one piece".
2. mpeg audio datatype not only supports streaming, it doesn't offer traditional behaviour at all.

Thus, my code example should work at least on OS4, as mp3 datatype of AmigaOS loads and decodes the complete file at once (AFAIR) ?

Re: playing mp3 via datatypes doesn't work under MOS

Posted: Sat Mar 07, 2015 4:06 pm
by airsoftsoftwair
No, you should be able to load the mp3 via LoadSample() but this is of course overkill for longer MP3s since it will load the whole shebang into memory, maybe even trying to upload it to soundcard memory. When using OpenMusic() datatypes won't be used at all because they don't support streaming (except the MorphOS extensions, but they are currently unsupported). OpenMusic() always streams sounds while LoadSample() buffers them completely in memory. That's why currently only LoadSample() supports datatype loading, OpenMusic() doesn't.

Re: playing mp3 via datatypes doesn't work under MOS

Posted: Wed May 25, 2016 2:25 am
by p-OS
Now I upgraded to Hollywood 6.1.

The code in my first post still results in the error mentioned there. My system is running MorphOS 3.9.

As told before, multiview can play the same mp3 file without problems.

Re: playing mp3 via datatypes doesn't work under MOS

Posted: Wed May 25, 2016 5:29 pm
by jPV
I also noticed that quite big percentage of mp3 files won't work with Hollywood on MorphOS. Some files complain "Sound file "a.mp3" is in an unknown/unsupported format!", some just don't play (nothing heard, or just very short "blip"). And they all do play fine with Multiview, Ambient's internal player, and Jukebox.

I just tried three non working mp3 files on Windows too, two did work and one didn't... so doesn't seem totally perfect there either, but better.

I wonder if Hollywood could get confused by some ID3 tags or other mess in the files?

Edit: although Multiview and those other mentioned programs use Reggae on MorphOS, and not datatypes. I wonder what other program could be tried to test with datatypes.. hmm..

Re: playing mp3 via datatypes doesn't work under MOS

Posted: Wed May 25, 2016 6:18 pm
by jPV
Well.. I removed Reggae and tried with Multiview, it's using datatypes then, and Multiview played now the same songs as Hollywood did under Windows. Interestingly that one same song didn't play, but others did.

Re: playing mp3 via datatypes doesn't work under MOS

Posted: Thu May 26, 2016 1:46 am
by p-OS
If your observations are correct, that would mean that Hollywood tried to detect filetype itself even if it is loaded via datatypes....

Re: playing mp3 via datatypes doesn't work under MOS

Posted: Thu May 26, 2016 9:04 am
by jPV
And I did use the code in the first post for these tests, with OpenMusic(). Although it was said that it shouldn't use datatypes, but there seemed to be datatypes references in the Snoopium log anyway.

The first time I myself started to notice that all mp3 files won't play was with the HollyAMP example program...

Re: playing mp3 via datatypes doesn't work under MOS

Posted: Thu May 26, 2016 7:45 pm
by airsoftsoftwair
I can play MP3s fine here on MorphOS 3.9 using datatypes but I only have a few test files on my MorphOS system. If you have files that work with Multiview but not with Hollywood, please provide them and I'll take a look.
jPV wrote:I just tried three non working mp3 files on Windows too, two did work and one didn't... so doesn't seem totally perfect there either, but better.
Be careful with MP3s on Windows. Hollywood's internal MP3 player is based on DirectShow which is really ancient and indeed has problems if the MP3 file uses certain extensions like ID3 tags. I think Microsoft hasn't updated this code since 1998 or so. On Windows I'd really recommend to use the avcodec plugin instead because the internal replayer is picky.
jPV wrote:And I did use the code in the first post for these tests, with OpenMusic(). Although it was said that it shouldn't use datatypes, but there seemed to be datatypes references in the Snoopium log anyway.
Who says that OpenMusic() doesn't use datatypes? It does, but only on MorphOS because MorphOS is the only system where sound.datatype is able to handle streaming.