public SDL2MusicChannel () { _readBuffer = new float[5292 * 2]; _music = null; _source = AL.GenSource(); _buffers = AL.GenBuffers(4); _thread = new Thread(ThreadProc); _thread.Start(); }
public bool Play (IMusicTrack music, bool loop) { var sdlMusic = music as SDL2MusicTrack; if (sdlMusic == null) throw new ArgumentException("Music must be an SDL2 music track.", "music"); Stop(); _music = sdlMusic; _isLooping = loop; Play(); return false; }