|
Post by larrybtoys on May 30, 2022 19:35:41 GMT 1
Does anyone know if you can play an MP3 in GB32 or is there an add-on application that can be called within GB32 to do it. Not only would I like to use MP3s since they are much smaller but I would also like to have background music playing in a game and still be able to have my GB32 program play other game sounds without stopping the background music. TIA
|
|
|
Post by (X) on May 30, 2022 22:48:06 GMT 1
MCI is more than up to the task.
$Library "gfawinx" $Library "UpdateRT" UpdateRuntime ' Patches GfaWin23.Ocx
OpenW # 1
' ' You can store the sound file in the GFA files resource area... ' Local sfx_mp3$ = ":Matrix_mp3" ' ' Create a temporary file because you can't use use the resource file directly. ' The file will automatically be deleted after pogram ends. ' Local A_tfn$ = TempFileName("mp3", "mp3") FileCopy sfx_mp3$ To A_tfn$
Mci "close all"
Mci "open " & A_tfn$ & " alias sfx" Mci "play sfx from 1"
Do : Sleep : Until Me Is Nothing
Mci "close all"
CloseW # 1
|
|
|
Post by (X) on May 30, 2022 23:08:18 GMT 1
BASS offers more options and effects, FFT, Wave file graphs etc...
MCI is hard to beat, it is able to play MP3|Wav audio, MIDI, Videos, CDs and more.
You can Play multiple audio files simultaneously [from <time> to <time> ], Pause, Resume, Stop even Record.
|
|