コード例 #1
0
 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();
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 private Sound(FMOD.System newsys)
 {
     newsys.CheckNull("newsys");
     system = newsys;
 }