Esempio n. 1
0
        private void RenderSN76489Audio(int[] inout_buffer, int in_start_sample_index, int in_end_sample_index)
        {
            int sample_pos = in_start_sample_index * 2;

            // render samples
            for (int sample_index = in_start_sample_index; sample_index < in_end_sample_index; sample_index++)
            {
                m_SN76489.RenderAudioStream(ref inout_buffer[sample_pos], ref inout_buffer[sample_pos + 1]);
                sample_pos += 2;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Renders audio samples into the audio buffer
        /// </summary>
        /// <param name="inout_buffer">Audio buffer</param>
        /// <param name="in_start_sample_index">Samples index of the first sample to render</param>
        /// <param name="in_end_sample_index">Samples index of the last sample to render</param>
        public void RenderAudio(int[] inout_buffer, int in_start_sample_index, int in_end_sample_index)
        {
            // check for chip enable
            if (!m_sound_chip_enable)
            {
                return;
            }

            // render samples
            int sample_pos = in_start_sample_index * 2;

            for (int sample_index = in_start_sample_index; sample_index < in_end_sample_index; sample_index++)
            {
                m_sound_chip.RenderAudioStream(ref inout_buffer[sample_pos], ref inout_buffer[sample_pos + 1]);
                sample_pos += 2;
            }
        }