public SoundIn(FMOD.System newsys, string connectionUrl) { newsys.CheckNull("SoundIn newsys"); system = newsys; ads = new AdKillingThread(); ads.ThreadReady += this.HandleThreadReady; SoundDataBuffer = new CircularBuffer(pumpedBuffer); streamSound = new SoundProvider(this.system, connectionUrl); this.SoundSource = streamSound; streamSound.Sounds.PlaySound(); }
public SoundProvider(FMOD.System newsys) { newsys.CheckNull("newsys"); system = newsys; SoundDataBuffer = new CircularBuffer(defaultSize); thisLock = new Object(); pcmReadCallback = new FMOD.SOUND_PCMREADCALLBACK(this.PcmReadCallback); pcmSetPosCallback = new FMOD.SOUND_PCMSETPOSCALLBACK(this.PcmSetPosCallback); Sounds = Sound.CreateSound(this.system); Sounds.SoundInit(pcmReadCallback, pcmSetPosCallback); }
public SoundProvider(FMOD.System newsys, string connectionUrl) // reading chunks from stream { newsys.CheckNull("newsys"); system = newsys; SoundDataBuffer = new CircularBuffer(defaultSize); readLock = new Object(); FMOD.RESULT result = system.setStreamBufferSize(64 * 1024, FMOD.TIMEUNIT.RAWBYTES); Sound.ErrorCheck(result); pcmReadCallbackStream = new FMOD.SOUND_PCMREADCALLBACK(this.PcmReadCallbackStream); pcmSetPosCallback = new FMOD.SOUND_PCMSETPOSCALLBACK(this.PcmSetPosCallback); sound = Sound.CreateStream(this.system, connectionUrl, pcmReadCallbackStream, pcmSetPosCallback); }
private Sound(FMOD.System newsys) { newsys.CheckNull("newsys"); system = newsys; }