I am using visual studio / basic 2019. using the windows media to play sounds (WMPLib.WindowsMediaPlayer).
It works great, I can play multiple sounds etc. However what I realy want to do is play some sounds on sound card A. And other sounds in sound card B.
I am thinking that changing the default sound card, then playing the sound, then changing the defualt sound card and playing another sound might be the way to go, but I think when the sound card changes all the currently playing sounds stop.
Has anyone got any ideas how to acheieve this.
UKnod
16
Newbie Poster
Recommended Answers
Jump to PostAlso, you may consider reading NAudio's document "Understanding Output Devices" Here
Jump to PostNot to be overly pedantic, but: .NET Framework is the library and runtime support system used by a number of different Microsoft languages. Visual Basic.NET is one language, C# is another, F# is yet another. The same .NET libraries work for all of them.
There may not be examples of …
Jump to PostHere is a sample out from the documentation translated into VB.NET.
Imports System.ComponentModel Imports NAudio.Wave Public Class Form1 Dim devNum As Int32 Dim sFile As String Dim reader As AudioFileReader Dim outDev As WaveOut Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Try Dim i …
Jump to PostYes, devnum is the sound card you will be using, but if I were you, I would stick to the sample. After Googling this is what it is said about employing two sound cards at a time:
«Can you run 2 sound cards at the same time?
In most cases …
Jump to PostSorry about that. I forgot the device number:
Private Sub BtnPlay_Click(sender As Object, e As EventArgs) Handles btnPlay.Click Try If outDev Is Nothing Then outDev = New WaveOut() outDev.DeviceNumber = devNum ' Here you set the Device Number ' End If If reader Is Nothing Then …
All 25 Replies
rproffitt
2,580
"Nothing to see here."
Moderator
UKnod
16
Newbie Poster
UKnod
16
Newbie Poster
xrjf
213
Posting Whiz
Premium Member
xrjf
213
Posting Whiz
Premium Member
xrjf
213
Posting Whiz
Premium Member
UKnod
16
Newbie Poster
rproffitt
commented:
The library is for .NET apps. VB.NET is .NET. However I understand that people want code for their choice of .NET language.
+16
UKnod
16
Newbie Poster
Schol-R-LEA
1,446
Commie Mutant Traitor
Featured Poster
xrjf
213
Posting Whiz
Premium Member
rproffitt
commented:
Most excellent example. +1
+16
UKnod
16
Newbie Poster
xrjf
213
Posting Whiz
Premium Member
UKnod
16
Newbie Poster
UKnod
16
Newbie Poster
xrjf
213
Posting Whiz
Premium Member
UKnod
16
Newbie Poster
xrjf
213
Posting Whiz
Premium Member
UKnod
16
Newbie Poster
xrjf
213
Posting Whiz
Premium Member
UKnod
16
Newbie Poster
UKnod
16
Newbie Poster
UKnod
16
Newbie Poster
xrjf
213
Posting Whiz
Premium Member
UKnod
16
Newbie Poster
UKnod
16
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.