Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
0
Reply
Stop brodcastig in 3 external soundcard
sawass sawass
Jun 6 2011 6:08 PM
1.3k
Reply
Hello
,
I
want to stop
the
broadcasting
of a
sound
wave
in
looping.I
've
used
this method but
to no avail
:
private void btnStop_Click(object sender, EventArgs e)
{
if (output != null)
{
if (output.PlaybackState == NAudio.Wave.PlaybackState.Playing)
{
output.Stop();
}
}
}
I use
the
play
function
follows:
public void PlaySoundInDevice(int deviceNumber, string fileName)
{
if (outputDevices.ContainsKey(deviceNumber))
{
outputDevices[deviceNumber].WaveOut.Dispose();
outputDevices[deviceNumber].WaveStream.Dispose();
}
var waveOut = new WaveOut();
waveOut.DeviceNumber = deviceNumber;
WaveStream waveReader = new WaveFileReader(fileName);
LoopStream loop = new LoopStream(waveReader);
waveOut = new WaveOut();
waveOut.Init(loop);
waveOut.Play();
// hold onto the WaveOut and WaveStream so we can dispose them later
outputDevices[deviceNumber] = new PlaybackSession { WaveOut = waveOut, WaveStream = waveReader };}
Ihave 3 external soundcard and the wave out of the 3 sond card
Is
anybody
can
help me
please
and
thank you
in advance
.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
Please Help - RowStyle Event
Add a new user using csharp