Once again multi channel sound...
  Home FAQ Contact Sign in
microsoft.public.win32.programmer.directx.audio only
 
Advanced search
POPULAR GROUPS

more...

microsoft ... directx.audio Profile…
 Up
Once again multi channel sound...         


Author: Gottfried Lesigang
Date: Mar 15, 2008 13:35

Hi @ all!

Thanks to your great help I managed to have more than 20 independant
headphones on a single PC. This is working great! For this I was using
M-Audio Delta 1010LT cards.

I'd like to get the same thing cheaper. So I bought a simple 7.1-card which
- as I was hoping - should offer 4 stereo pairs.

After installing the M-Audio-card several device names showed up including

Soundcardname 1/2
Soundcardname 3/4
Soundcardname 5/6
Soundcardname 7/8

I used these names to select the device for a certain output.

But the new 7.1-card comes up only with a single line :-(
Show full article (1.25Kb)
53 Comments
Re: Once again multi channel sound...         


Author: Sam Brown
Date: Mar 15, 2008 14:50

"Gottfried Lesigang" wrote in message
news:cejcrdnn48y3.1rgqpxm61y3el$.dlg@40tude.net...
> But the new 7.1-card comes up only with a single line :-(

That's all you get with most cards. The M-Audio is a card
for professional sound people, far more than most people
would need.
> How can I get the 8 channels of my 7.1-card as 4 stereo pairs as it works
> with the M-Audio-card?

Instead of several 2-channel devices you have one 8-channel
device. The way I would do it is have a single sound playing
down all eight channels, which you can do by using
WAVEFORMATEXTENSIBLE when you create your buffer. The you just
have to copy the channels of your source into the relevant
channels of your buffer.

For instance, using my 5.1 Audigy 2 here, I have three stereo
outputs, front L+R, back L+R and centre + sub. I would create
a six-channel buffer and copy each stereo sample three times
into it, one for each output.

- Sam B
no comments
Re: Once again multi channel sound...         


Author: Gottfried Lesigang
Date: Mar 15, 2008 16:23

Hi Sam!

Tank you very much for your answer!
>> But the new 7.1-card comes up only with a single line :-(
>
> That's all you get with most cards. The M-Audio is a card
> for professional sound people, far more than most people
> would need.

That's true!
Show full article (2.22Kb)
no comments
Re: Once again multi channel sound...         


Author: Alessandro Angeli
Date: Mar 15, 2008 22:31

From: "Gottfried Lesigang"
> My problem is that I'm not very experienced with sound
> programming. this feature is a key-feature for my
> application, but it's just about 2%% of my code ;-)
>
> At the moment I'm dveloping with C# in VS. For the sound
> I'm using DirectShow.Net. My free time is very limited...
> Learning advanced sound programming is quite a challenge!

Splitting or mixing uncompressed PCM audio channels is not
very advanced. Each channel is a sequence of fixed size
samples (e.g. the sample of 16-bit PCM are short ints). The
samples of each channel are interleaved in the buffer in a
fixed pattern (e.g. if you have 4 channels, the pattern in
the buffer is 123412341234, where the numbers represent
channels 1 to 4).

So, if you for example want to mix 2 x 16-bit stereo buffers
into 1 x 16-bit 4-channel buffer, you just read 2 shorts
from buffer #1 and write them to the target buffer, than 2
short from buffer #2, them buffer #1 again and so on...
Show full article (1.46Kb)
no comments
Re: Once again multi channel sound...         


Author: Gottfried Lesigang
Date: Mar 16, 2008 03:59

Hi Alessandro!

Thank you very much for helping me!
>> [Problem description]
>
> Splitting or mixing uncompressed PCM audio channels is not
> very advanced.

For an expert nothing is advanced ;-)
> [Explanation of channel splitting]

Indeed, it doesn't sound too difficult...

But...

I'm not a full time developer. My working time is very limited :-(

Therefore I would prefer not doing this on my own...

There are some more issues: I want to have more than 4 stereo channels on
one PC. I hope to combine a 7.1-mainboard with one or two (or even more)
multi channel cards. What problems do I have to expect?

What I need (preferably C#-OOP - Mono-portable - just a scratch!):

//Aircode untested - every TODOs need coding

public enum enmPlayState { Init, Playing, Paused, Finished }
Show full article (3.52Kb)
no comments
Re: Once again multi channel sound...         


Author: Gottfried Lesigang
Date: Mar 16, 2008 06:19

Hi at all!

Something additional:

If you could provide a normal C-DLL I could make the managed .Net-Wrapper
myself.

In this case your DLL would need methods like

int GetChannelCount();
Get/SetVolume(int ChannelNumber)
StartPlay(int ChannelNumber, string SoundFileName) //for MP3, OGG, WMA, WAV

and so on...

If it is a problem to handle several different multi channel cards I could
mix both procedures:
One 7.1-mainboard supplies (with your help) the first 4 channels. If there
are more channels needed I use the M-Audio cards in my approved way.

TIA
Gottfried

--
Home: www.develes.net
Mail: gol@develes.net
no comments
Re: Once again multi channel sound...         


Author: Chris P.
Date: Mar 17, 2008 09:11

On Sat, 15 Mar 2008 21:35:29 +0100, Gottfried Lesigang wrote:
> Thanks to your great help I managed to have more than 20 independant
> headphones on a single PC. This is working great! For this I was using
> M-Audio Delta 1010LT cards.
>
> I'd like to get the same thing cheaper. So I bought a simple 7.1-card which
> - as I was hoping - should offer 4 stereo pairs.

What interface are you using to play the sound now? With
WAVEFORMATEXTENSIBLE you can play mono streams with the dwChannelMask set
to the channel you want the sound to come out of.

--
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
no comments
Re: Once again multi channel sound...         


Author: Gottfried Lesigang
Date: Mar 17, 2008 13:21

Hi Chris!
>> [Multi Channel Sound in a language school]
>> I'd like to get the same thing cheaper. So I bought a simple 7.1-card which
>> - as I was hoping - should offer 4 stereo pairs.
>
> What interface are you using to play the sound now? With
> WAVEFORMATEXTENSIBLE you can play mono streams with the dwChannelMask set
> to the channel you want the sound to come out of.

Well, after spending too many hours on reading and puzzling around I remain
with my perfectly working code with the M-Audio cards (up to 6 cards in one
PC providing 25 channels [+ onboard-sound]). I'm a teacher, software
development is my second job. It's a pitty as I'm really interested in
sound programming, but I dont have the time to learn/do this now

PortAudio is great, SDL.NET seems to be great, splitting channels and
re-mixing them doesn't seem to be unresolveable, but - together with the
decoding part (MP3, OGG, WMA) it would take too much of my time to puzzle
all out.
Show full article (1.59Kb)
no comments
Re: Once again multi channel sound...         


Author: Chris P.
Date: Mar 17, 2008 13:38

On Mon, 17 Mar 2008 21:21:12 +0100, Gottfried Lesigang wrote:
> Well, after spending too many hours on reading and puzzling around I remain
> with my perfectly working code with the M-Audio cards (up to 6 cards in one
> PC providing 25 channels [+ onboard-sound]...
Show full article (1.83Kb)
no comments
Re: Once again multi channel sound...         


Author: Gottfried Lesigang
Date: Mar 17, 2008 14:19

Hi Chris!
> The reason I suggested the WAVEFORMATEXTENSIBLE with dwChannelMask is that
> it will fit into your current code with hardly any modification.

Sounds great!
> Right now
> you open each device name twice, panning left or right as appropriate.

No. In fact I had to add just one single line of code to a free sound
player sample to address the channels. (Don't ask how much time it took to
find that out ;-) )

In fact I have to do just nothing. No streaming, no en-/decoding, no
buffers, no mixing, no splitting. It works with MP3, WMA and WAV. Other
formats I did not test yet...

Here is the central part of my code (using DirectShowLib):

The DsDevice-instance I get with this:
Show full article (3.11Kb)
no comments
1 2 3 4 5 6