http://audiere.sourceforge.net

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
WolfgangS
Enthusiast
Enthusiast
Posts: 174
Joined: Fri Apr 25, 2003 3:30 pm

http://audiere.sourceforge.net

Post by WolfgangS »

Hi !
http://audiere.sourceforge.net

Wouldn´d be that an excellent replace for the old midas11.dll ??
It stays under LGPL Licence so you can use it in any commercial product.

MFG
WolfgangS
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Damn !

Exactly what i was looking for to use in Extreme Violence Redux

:lol:
WolfgangS
Enthusiast
Enthusiast
Posts: 174
Joined: Fri Apr 25, 2003 3:30 pm

Post by WolfgangS »

I made this code. Maybe you have more success then me ???
(dont forget to get the whole packet and get the dll AND the info´s how to use it)

MFG
WolfgangS

PS: You can also check the MikMod dll. There is also a working version available for pb. Check this link: viewtopic.php?t=7404

New: New code

Code: Select all

#audiere = 0 
name.s="SOUND28.WAV" 

Procedure GetSupportedAudioDevices() 
  ProcedureReturn CallFunction(#audiere,"_AdrGetSupportedAudioDevices@0") 
EndProcedure 

Procedure.l OpenDevice(device.s,parameter.s) 
  ProcedureReturn CallFunction(#audiere,"_AdrOpenDevice@8",device.s,parameter.s) 
EndProcedure 

Procedure.l GetVersion() 
  ProcedureReturn CallFunction(#audiere,"_AdrGetVersion@0") 
EndProcedure 

Procedure.l OpenSound(device.l,string.s,flag.l) 
  ProcedureReturn CallFunction(#audiere,"_AdrOpenSound@12",*device.l,string.s,0) 
EndProcedure 

If OpenConsole()=0 
MessageRequester("","Error open Console",0):End:EndIf 

If OpenLibrary(#audiere,"audiere.dll")=0 
MessageRequester("","Error open audiere.dll",0):End:EndIf 

PrintN(PeekS(GetSupportedAudioDevices())) 
PrintN(PeekS(GetVersion())) 

device.l=OpenDevice("directsound","buffer=100,rate=44100") 
If device.l=0 
MessageRequester("","Error open Device",0):End:EndIf 
Print(Str(Hex(device.l))) 

sound=OpenSound(device.l,"SOUND28.WAV",#False) 
If sound=0 
MessageRequester("","Error OpenSound",0):End:EndIf 

CloseLibrary(#audiere) 
loop: Goto loop 
Last edited by WolfgangS on Wed Sep 03, 2003 9:05 am, edited 1 time in total.
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Your example does not seem to work!

Gives me a null address in all functions :P
WolfgangS
Enthusiast
Enthusiast
Posts: 174
Joined: Fri Apr 25, 2003 3:30 pm

Post by WolfgangS »

There was a small error in the code. Unfortunately i don´t figure out how to run successfully the _AdrOpenSound@12 procedure and the
Sound->Play() function (check the audiere manual for it)

MFG
WolfgangS
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

This library looks very nice. I will take a closer look.
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

WolfgangS wrote:There was a small error in the code. Unfortunately i don´t figure out how to run successfully the _AdrOpenSound@12 procedure and the
Sound->Play() function (check the audiere manual for it)

MFG
WolfgangS
Yes, the code fails when calling the player functions... I lost a few hours last night trying to make sense of it.... The dll is not has easy to use has i thought...
Post Reply