[Gambas-user] sound in gambas 3

Benoît Minisini gambas at ...1...
Sat Feb 8 03:33:34 CET 2014


Le 08/02/2014 02:04, Benoît Minisini a écrit :
> Le 08/02/2014 01:24, Dominique Michel a écrit :
>> Hi,
>>
>> I try to do my first gambas program, and I am stuck with the sound.
>>
>> All I have for now is 2 labels, 2 value boxes and 1 toggle button.
>>
>> When I press the toggle button, it launch a message box with the 2
>> values in the value boxes and some text. 1 is a frequency, the other is
>> the amplitude. I want to use these values to make some sounds.
>>
>> When looking for sound functions, I found Play in sdl.sound. Is it
>> possible with it, or with another function, to use something like:
>>
>> Play frequency volume
>>
>> Another way would be to create an audio file on the fly...
>>
>> Dominique
>>
>
> You must use gb.media, which is the interface to gstreamer. GStreamer
> has a plugin for generating sinusoidal sounds (its name is
> "audiotestsrc", look at the GStreamer documentation for the details).
>
> Regards,
>

I made an example of that for you in revision #6140.

Regards,

-- 
Benoît Minisini




More information about the User mailing list