CodePlexProject Hosting for Open Source Software
An unexpected error has occured.
There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Resolved
No files are attached
markheath wrote Dec 14, 2012 at 11:00 AM
vexorum wrote Dec 23, 2012 at 6:42 AM
private static WaveChannel32 CreateInputStream(string fileName) { if (!File.Exists(fileName)) { throw new InvalidOperationException("Cannot find audio file: " + fileName); } WaveChannel32 inputStream; if (fileName.EndsWith(".mp3")) { WaveStream mp3Reader = new Mp3FileReader(fileName); inputStream = new WaveChannel32(mp3Reader); } else if (fileName.EndsWith(".wav")) { WaveStream mp3Reader = new WaveFileReader(fileName); inputStream = new WaveChannel32(mp3Reader); } else { throw new InvalidOperationException("Unsupported extension"); } return inputStream; }
markheath wrote Dec 23, 2012 at 7:18 AM
vexorum wrote Dec 23, 2012 at 5:43 PM
markheath wrote Dec 23, 2012 at 6:31 PM
vexorum wrote Dec 24, 2012 at 7:46 AM
isAdded = true; mixer.AddMixerInput(sample as ISampleProvider);
isAdded = false; mixer.RemoveMixerInput(sample);
markheath wrote Dec 24, 2012 at 9:08 AM
vexorum wrote Dec 24, 2012 at 3:21 PM
markheath wrote Dec 25, 2012 at 6:47 PM
vexorum wrote Dec 26, 2012 at 11:56 PM
public class SilenceProvider : ISampleProvider { private readonly WaveFormat format; public SilenceProvider(WaveFormat format) { this.format = format; } public int Read(float[] buffer, int offset, int count) { for (int i = 0; i < count; i++) { buffer[offset + i] = 0; } return count; } public WaveFormat WaveFormat { get { return format; } } }
markheath wrote Dec 27, 2012 at 7:17 AM
markheath wrote Jan 9 at 9:51 AM
Sign in to add a comment or to set email notifications
Keyboard shortcuts are available for this page.