Bug in OpenMusic when running two Hollywood applications

Report any Hollywood bugs here
Post Reply
amiga23
Posts: 33
Joined: Thu Jan 30, 2014 6:01 pm

Bug in OpenMusic when running two Hollywood applications

Post by amiga23 »

I think I found a bug with OpenMusic.

How to reproduce:
1. Start HollyAmp Example 2 times.
2. Load a MP3 on one of the 2 started HollyAmps (it is not necessary to press play, open a file is enough).
3. Try to load a MP3 in the other instance of HollyAmp
-> Error:
Konnte Musik 1 nicht finden!
Datei: HollyAmp.hws (aktuelle Zeile: 430 - In Funktion: GetAttribute)
When using the following instead of hardcoded id 1

Code: Select all

music_id=OpenMusic(Nil, filename$)
music_id will be 0 but any call of GetAttribute will give this error. Calling PlayMusic(0) does simply do nothing.

The same happens if starting any other Hollywood application. Also when using 2 different hollywood applications.

My System: MorphOS 3.7 Hollywood 5.3
amiga23
Posts: 33
Joined: Thu Jan 30, 2014 6:01 pm

Re: Bug in OpenMusic when running two Hollywood applications

Post by amiga23 »

OpenMusic returns Nil if it fails.

Code: Select all

If isMusic(f$)
    music_id=OpenMusic(f$)
    If GetType(music_id) <> #NIL
        ; Do something with the music
        PlayMusic(music_id)
    Else
        SystemRequest(prg_name,"Something wrong with Audio.\nEither wrong file format or another\nApplication is using audio.","OK")
    EndIf
EndIf 
OpenMusic seems to already open the Audio device even that the music is not being played. So this is not a bug.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Bug in OpenMusic when running two Hollywood applications

Post by airsoftsoftwair »

Yes, this is not a bug but a limitation in Hollywood's audio driver. It currently can only run in exclusive mode, i.e. only one application may use the audio driver. But this is going to change in the future.
amiga23
Posts: 33
Joined: Thu Jan 30, 2014 6:01 pm

Re: Bug in OpenMusic when running two Hollywood applications

Post by amiga23 »

This is fixed in Hollywood 6. I did test on MorphOS only. It is now possible to start several Hollywood applications and play music/sound at the same time.
Looking forward for the new Sound SDK. Will it be possible to create some sound analysis like level meter or even FFT?
Thank you very much for this great Version 6
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Bug in OpenMusic when running two Hollywood applications

Post by airsoftsoftwair »

Will it be possible to create some sound analysis like level meter or even FFT?
Sure.
Thank you very much for this great Version 6
That's why we at Airsoft Softwair say: Life begins at 6.0 :-)
Post Reply