Page 1 of 1

Bug in OpenMusic when running two Hollywood applications

Posted: Sun Oct 12, 2014 2:37 pm
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

Re: Bug in OpenMusic when running two Hollywood applications

Posted: Sun Oct 12, 2014 4:59 pm
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.

Re: Bug in OpenMusic when running two Hollywood applications

Posted: Tue Oct 14, 2014 11:49 pm
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.

Re: Bug in OpenMusic when running two Hollywood applications

Posted: Sat Mar 07, 2015 8:22 pm
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

Re: Bug in OpenMusic when running two Hollywood applications

Posted: Sun Mar 08, 2015 11:34 am
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 :-)