[Gambas-user] R: SDL2 : "Channel" Class has not property nor metods...
Ru Vuott
vuott at ...325...
Fri Jan 2 09:55:18 CET 2015
Hello Benoît,
gb.sdl2.audio, like gb.sdl.sound, has these Classes (named channel):
- Channel
- Channels
" At present " by using "gb.sdl2.audio" I can play a file .wav with "Sound" and "Channels" Class:
For example we'll play simultaneously 2 file wav:
*****************************************************
Public Sub Main()
Dim sn1, sn2 As Sound
' We set how many channels we want to use:
Channels.Count = 2
' We set the volume for each channel:
Channels[0].Volume = 110
Channels[1].Volume = 90
' We set for each channel a file WAV:
sn1 = Sound.Load("/path/of/first/.wav")
sn2 = Sound.Load("/path/of/second/file.wav")
' We play simultaneously those two files wav:
Channels[0].Play(sn1)
Channels[1].Play(sn2)
' We need a loop:
While True
Wait 0.01
Wend
End
*******************************************************
Well, with that example I used " Channels " in gb.sdl2.audio, and I did not need "Channel" Class.
=== By using "Channel" class in gb.sdl.sound ===
In old "gb.sdl.sound" a " Channel " Class also is active.
I used it like that:
Public Sub Button1_Click()
Dim s As Sound
Channels[0].Volume = 0.03
s = New Sound("/path/of/file.wav")
Channel(Channels[0]).Play(s)
End
====================
...If I want to use " Channel " Class in new "gb.sdl2.audio" component, it seems its properties and methods aren't active.
....but, perhaps, in new "gb.sdl2.audio" component we do not need "Channel" Class, because we can use efficiently the " Channels " Class.
Regards
vuott
--------------------------------------------
Ven 2/1/15, Benoît Minisini <gambas at ...1...> ha scritto:
Oggetto: Re: [Gambas-user] R: SDL2 : "Channel" Class has not property nor metods...
A: "mailing list for gambas users" <gambas-user at lists.sourceforge.net>
Data: Venerdì 2 gennaio 2015, 04:47
Le 02/01/2015 02:14, Ru
Vuott a écrit :
> ...in short, SDL2
"Channel" Class seems to be useless at present.
>
> Regards
> vuott
>
Channel has only dynamic
methods and properties. Do you know how to use it?
--
Benoît
Minisini
------------------------------------------------------------------------------
Dive into the World of Parallel Programming!
The Go Parallel Website,
sponsored by Intel
and developed in partnership with Slashdot Media, is your
hub for all things parallel software
development, from weekly thought
leadership
blogs to news, videos, case studies, tutorials and more.
Take a
look and join the conversation now.
http://goparallel.sourceforge.net
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
More information about the User
mailing list