Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WAVEFORMATEXTENSIBLE and waveOutOpen

154 views
Skip to first unread message

Stian Aagedal

unread,
Jul 28, 2004, 5:49:47 AM7/28/04
to
Hi!

I am developing a program with multichannel audio support. I use the
multimedia extensions API to play audio. My problem is that the
following piece of code seems to work only on some sound cards.

----

WAVEFORMATEXTENSIBLE wfe;

ZeroMemory(&wfe, sizeof(wfe));

wfe.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
wfe.Format.cbSize = sizeof(wfe) - sizeof(WAVEFORMATEX);
wfe.Format.nChannels = 6;
wfe.Format.nSamplesPerSec = 44100;
wfe.Format.wBitsPerSample = 16;
wfe.Format.nBlockAlign = wfe.Format.nChannels *
(wfe.Format.wBitsPerSample / 8);
wfe.Format.nAvgBytesPerSec = wfe.Format.nSamplesPerSec *
wfe.Format.nBlockAlign;

wfe.dwChannelMask = KSAUDIO_SPEAKER_5POINT1;
wfe.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
wfe.Samples.wValidBitsPerSample = 16;

mmr = waveOutOpen(&m_hwoDevice, m_nDeviceId, (LPCWAVEFORMATEX)&wfe,
(DWORD_PTR)&Callback,
(DWORD_PTR)m_hCompletionEvent,
CALLBACK_FUNCTION);

---

Did I miss something or is multichannel audio supported only when using
DirectSound for playback? The strange thing is that the code above works
fine with sound cards from vendors such as Terratec and M-Audio, but
with sound cards from Creative Labs the waveOutOpen call either returns
invalid format (code 32) or audio is played only through the front left
and front right speakers.

Thanks for your time!

Stian Aagedal

Chris P. [MVP]

unread,
Jul 28, 2004, 10:07:06 AM7/28/04
to

You are exactly correct. Professional vendors such as Terractec, M-Audio,
MOTU, Echo Audio, etc have optimized their driver interface for WinMM
(waveOutOpen) and usually ASIO as well. Creative targets consumer systems,
optimized for gaming, and only supports multichannel on the DirectSound
interface. There's no reason they *couldn't* support multichannel on WinMM
but they feel it isn't necessary. I feel their driver writers are lazy :)


Stian Aagedal

unread,
Jul 28, 2004, 10:39:55 AM7/28/04
to
Chris P. [MVP] wrote:
> You are exactly correct. Professional vendors such as Terractec, M-Audio,
> MOTU, Echo Audio, etc have optimized their driver interface for WinMM
> (waveOutOpen) and usually ASIO as well. Creative targets consumer systems,
> optimized for gaming, and only supports multichannel on the DirectSound
> interface. There's no reason they *couldn't* support multichannel on WinMM
> but they feel it isn't necessary. I feel their driver writers are lazy :)

Thank you for your answer. I guess there is no way around DirectSound
then. Creative is simply too big and has too many customers... :-(

Stian

Chris Hill

unread,
Jul 28, 2004, 10:21:19 PM7/28/04
to
On Wed, 28 Jul 2004 10:07:06 -0400, "Chris P. [MVP]"
<ms...@chrisnet.net> wrote:

>You are exactly correct. Professional vendors such as Terractec, M-Audio,
>MOTU, Echo Audio, etc have optimized their driver interface for WinMM
>(waveOutOpen) and usually ASIO as well. Creative targets consumer systems,
>optimized for gaming, and only supports multichannel on the DirectSound
>interface. There's no reason they *couldn't* support multichannel on WinMM
>but they feel it isn't necessary. I feel their driver writers are lazy :)

I assume this has been brought to the attention of Creative's
developer support (do they even have such a thing anymore?). Has
Creative actively said "we won't ever support that"? It seems crazy
not to support this since winmm doesn't appear to be a great burden,
it is a fairly simple interface and has the advantage that it is a
fixed target. Are there other features that the professional vendors
offer that Creative doesn't or there any other major shortcomings in
the Creative drivers? How does the driver quality compare?

I thought I'd never buy another Creative card after suffering with bad
drivers years ago, but unfortunately it seems like they are the only
major name in the consumer space. I'm planning to get a new system
soon and I'd like to do some audio programming with it (but at the
same time I want it to be a good general purpose card for normal use
and games), so I'm looking for soundcard recommendations. Do you have
any recommendations for sources of information comparing the
professional cards to each other and Creative's line?

Chris

Chris P. [MVP]

unread,
Jul 29, 2004, 3:05:02 PM7/29/04
to
Chris Hill wrote:
> On Wed, 28 Jul 2004 10:07:06 -0400, "Chris P. [MVP]"
> <ms...@chrisnet.net> wrote:
>
>> You are exactly correct. Professional vendors such as Terractec,
>> M-Audio, MOTU, Echo Audio, etc have optimized their driver interface
>> for WinMM (waveOutOpen) and usually ASIO as well. Creative targets
>> consumer systems, optimized for gaming, and only supports
>> multichannel on the DirectSound interface. There's no reason they
>> *couldn't* support multichannel on WinMM but they feel it isn't
>> necessary. I feel their driver writers are lazy :)
>
> I assume this has been brought to the attention of Creative's
> developer support (do they even have such a thing anymore?). Has
> Creative actively said "we won't ever support that"? It seems crazy
> not to support this since winmm doesn't appear to be a great burden,
> it is a fairly simple interface and has the advantage that it is a
> fixed target. Are there other features that the professional vendors
> offer that Creative doesn't or there any other major shortcomings in
> the Creative drivers? How does the driver quality compare?

Commuicating with Creative has become a very tedious task. Their email is
auto-replied by a form letter response, and it takes several more back and
forths before you can actually get a human to read your email. They do have
a newsgroup forum, as well as their own NNTP news server news.creative.com.
Perhaps with enough backing you can get them to change their ways, this was
how the linux users convinced them to create an open source driver.
Creative is big on features for their driver, but there are quality issues,
although they are a lot better now than they were 2 years ago. For whatever
reason Creative thinks that you should never have more than one sound card
in your computer. I have 4 from different vendors that I use for testing.
None of their fancy little GUI things would work because they were expecting
the creative card to be the only sound card in your machine. Maybe, they
have fixed it by now considering that most computers come with on-board
sound whether you want it or not.

> I thought I'd never buy another Creative card after suffering with bad
> drivers years ago, but unfortunately it seems like they are the only
> major name in the consumer space. I'm planning to get a new system
> soon and I'd like to do some audio programming with it (but at the
> same time I want it to be a good general purpose card for normal use
> and games), so I'm looking for soundcard recommendations. Do you have
> any recommendations for sources of information comparing the
> professional cards to each other and Creative's line?

There are some decent reviews here:
http://www.hothardware.com/category.cfm?cid=6
I had found a head-to-head review previously but I can't seem to find it
now. I would call Terratec, Prosumer - they are a good end user option.
Most of the other professional brands are targeted to home studio setups for
semi-professional recording. Their hardware is typically no good for
playing games even part-time.


0 new messages