Exemplo n.º 1
0
        /// <summary>
        /// Gets Sample Settings from the WaveFileReader class in the OpenAlDotNet Libary
        /// </summary>
        /// <param name="_sample">The Sample Number to obtain the format details for</param>
        public static void getSampleSetting(int _sample)
        {
            WaveFileReader wfr = new WaveFileReader();

            wfr.OpenFile(globalSettings.osj.sampleLocations[_sample]);

            globalSettings.osj.sampleFormat_Channels[_sample]         = (short)wfr.Channels();
            globalSettings.osj.sampleFormat_BitsPerSample[_sample]    = (short)wfr.Bits();
            globalSettings.osj.sampleFormat_BufferBytes_Size[_sample] = wfr.Size();
            globalSettings.osj.sampleFormat_SamplesPerSecond[_sample] = wfr.Samples();
            globalSettings.osj.sampleSettings_Frequency[_sample]      = wfr.Frequency();
            globalSettings.osj.sampleFormat_LengthInSeconds[_sample]  = wfr.Seconds();
        }