private static void Main(string[] args) { var audioSystem = new AudioSystem(); audioSystem.Init(1, INITFLAGS.NORMAL); audioSystem.SetStreamBufferSize(64 * 1024, TIMEUNIT.RAWBYTES); var sound = audioSystem.CreateSound("Someday.mp3", (MODE.HARDWARE | MODE._2D | MODE.CREATESTREAM | MODE.OPENONLY)); var channel = sound.PlaySound(CHANNELINDEX.FREE, false); Console.ReadLine(); }
public Sound(AudioSystem audioSystem, string nameOrdata, MODE mode) { _audioSystem = audioSystem; audioSystem.System.createSound(nameOrdata, mode, ref _sound).Check(); }
public Channel(AudioSystem audioSystem, CHANNELINDEX channelIndex, Sound sound, bool paused) { _audioSystem = audioSystem; _sound = sound; _audioSystem.System.playSound(channelIndex, _sound.SoundInstance, paused, ref _channel).Check(); }