Exemplo n.º 1
0
        public long GetReleasedAudioOutBuffer(ServiceCtx Context)
        {
            long Position = Context.Request.ReceiveBuff[0].Position;
            long Size     = Context.Request.ReceiveBuff[0].Size;

            uint Count = (uint)((ulong)Size >> 3);

            long[] ReleasedBuffers = AudioOut.GetReleasedBuffers(Track, (int)Count);

            for (uint Index = 0; Index < Count; Index++)
            {
                long Tag = 0;

                if (Index < ReleasedBuffers.Length)
                {
                    Tag = ReleasedBuffers[Index];
                }

                Context.Memory.WriteInt64(Position + Index * 8, Tag);
            }

            Context.ResponseData.Write(ReleasedBuffers.Length);

            return(0);
        }
Exemplo n.º 2
0
        private void UpdateAudio()
        {
            long[] released = _audioOut.GetReleasedBuffers(_track, 2);

            for (int index = 0; index < released.Length; index++)
            {
                AppendMixedBuffer(released[index]);
            }
        }
Exemplo n.º 3
0
        private void UpdateAudio()
        {
            long[] Released = AudioOut.GetReleasedBuffers(Track, 2);

            for (int Index = 0; Index < Released.Length; Index++)
            {
                AppendMixedBuffer(Released[Index]);
            }
        }
Exemplo n.º 4
0
        private void AudioCallback()
        {
            long[] released = _output.GetReleasedBuffers(_trackId, int.MaxValue);

            lock (_releasedTags)
            {
                foreach (long tag in released)
                {
                    _releasedTags.Enqueue(tag);
                }
            }
        }
Exemplo n.º 5
0
        public ResultCode GetReleasedAudioOutBufferImpl(ServiceCtx context, long position, long size)
        {
            uint count = (uint)((ulong)size >> 3);

            long[] releasedBuffers = _audioOut.GetReleasedBuffers(_track, (int)count);

            for (uint index = 0; index < count; index++)
            {
                long tag = 0;

                if (index < releasedBuffers.Length)
                {
                    tag = releasedBuffers[index];
                }

                context.Memory.Write((ulong)(position + index * 8), tag);
            }

            context.ResponseData.Write(releasedBuffers.Length);

            return(ResultCode.Success);
        }