[Gambas-user] R: OpenAL (gb.openal) example code and problem loading .wav files

2015-08-21 Thread Ru Vuott
 the function  to load a .wav file into an audio buffer in order to play it.
 The latter  doesn't work, however. The alure class seems to be similar
 to glu in  that it's a high-level helper class to make common functions 
 easy,
 such as loading sound files directly.

 This line should load the .wav file into the buffer

We can use no Alure Class to load a .wav file into an audio buffer.
We can load directly the row audio data of a wav file in 3th parameter of 
Al.BufferData() method.

vuott





Ven 21/8/15, Kevin Fishburne kevinfishbu...@eightvirtues.com ha scritto:

 Oggetto: [Gambas-user] OpenAL (gb.openal) example code and problem loading 
.wav files
 A: gambas-user@lists.sourceforge.net
 Data: Venerdì 21 agosto 2015, 06:39
 
 Okay Benoît, you can take me off
 your list of people to kill now that 
 I've finally gotten around to implementing OpenAL. :)
 
 The documentation online is pretty spartan, with much of it
 being 
 outdated, but I still managed to set things up reasonably
 well to play a 
 sine wave at a specified frequency and I think I've found
 the function 
 to load a .wav file into an audio buffer in order to play
 it. The latter 
 doesn't work, however. The alure class seems to be similar
 to glu in 
 that it's a high-level helper class to make common
 functions easy, 
 such as loading sound files directly.
 
 This line should load the .wav file into the buffer and
 allow me to play 
 it, but it returns False:
 
 Print Alure.BufferDataFromFile(./test.wav,
 AudioBuffer[0])
 
 Here's the example project if anyone wants to play with it:
 
 http://eightvirtues.com/misc/OpenAL_Example.tar.gz
 
 This issue is probably unrelated, but on running the program
 this 
 message displays in the debug window:
 
 Error loading libdumb.so.1: libdumb.so.1: cannot open
 shared object 
 file: No such file or directory
 
 libdumb is described as DUMB is a tracker library with
 support for IT, 
 XM, S3M and MOD files. so I don't think that's an issue
 here. If OpenAL 
 support it however, the library might need to be added as a
 dependency 
 during compilation.
 
 -- 
 Kevin Fishburne
 Eight Virtues
 www: http://sales.eightvirtues.com
 e-mail: sa...@eightvirtues.com
 phone: (770) 853-6271
 
 
 --
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 

--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] R: OpenAL (gb.openal) example code and problem loading .wav files

2015-08-21 Thread Ru Vuott
Hello Kevin,

you did a good work.

Well, in your code I replaced 'setting up listener' code with this:
' Set up listener.
  Al.Listenerfv(Al.POSITION, [0, 0, 0])
  Al.Listenerfv(Al.VELOCITY, [0, 0, 0])
  Al.Listenerfv(Al.ORIENTATION, [0, 0, -1])

and the wav file plays (but NOT sine wave and wav file together ...I do not 
know if you want it also).


I suggest you insert this:
   Free(DataPointer)

after Close #Mem

Regards
vuott








Ven 21/8/15, Kevin Fishburne kevinfishbu...@eightvirtues.com ha scritto:

 Oggetto: [Gambas-user] OpenAL (gb.openal) example code and problem loading 
.wav files
 A: gambas-user@lists.sourceforge.net
 Data: Venerdì 21 agosto 2015, 06:39
 
 Okay Benoît, you can take me off
 your list of people to kill now that 
 I've finally gotten around to implementing OpenAL. :)
 
 The documentation online is pretty spartan, with much of it
 being 
 outdated, but I still managed to set things up reasonably
 well to play a 
 sine wave at a specified frequency and I think I've found
 the function 
 to load a .wav file into an audio buffer in order to play
 it. The latter 
 doesn't work, however. The alure class seems to be similar
 to glu in 
 that it's a high-level helper class to make common
 functions easy, 
 such as loading sound files directly.
 
 This line should load the .wav file into the buffer and
 allow me to play 
 it, but it returns False:
 
 Print Alure.BufferDataFromFile(./test.wav,
 AudioBuffer[0])
 
 Here's the example project if anyone wants to play with it:
 
 http://eightvirtues.com/misc/OpenAL_Example.tar.gz
 
 This issue is probably unrelated, but on running the program
 this 
 message displays in the debug window:
 
 Error loading libdumb.so.1: libdumb.so.1: cannot open
 shared object 
 file: No such file or directory
 
 libdumb is described as DUMB is a tracker library with
 support for IT, 
 XM, S3M and MOD files. so I don't think that's an issue
 here. If OpenAL 
 support it however, the library might need to be added as a
 dependency 
 during compilation.
 
 -- 
 Kevin Fishburne
 Eight Virtues
 www: http://sales.eightvirtues.com
 e-mail: sa...@eightvirtues.com
 phone: (770) 853-6271
 
 
 --
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 

--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user