Solved

Simultaneous Audio in and out on AWE64

Posted on 1998-09-20
12
479 Views
Last Modified: 2008-02-01
I'm running into a problem doing simultaneous stereo 16bit 44.1kHz audio input and output using a Creative AWE64 soundcard.  I'm using Direct X 6.0 (DirectSoundCapture & DirectSound) and MSVC++ 5.

Here's the problem: if I run the audio input and audio output code *simultaneously*, the audio input works fine, but audio output quality is degraded (sounds like it gets switched from 16 bits to 8 bits).  If I run the audio output alone, the sound is clean.  

Some other info:
- The problem is reproducible on other PCs that have AWE64 cards.
- I *am* able to do simultaneous clean 16/44.1 audio in and out using the same code on other PCs that don't use the AWE64 (eg my home PC which uses an ESS sound chip).
- All the DirectSound and DirectSoundCapture calls are returning DS_OK (including all calls where I set the audio formats).
- I also get the same glitchy audio output when I attempt to do simultaneous in and out on an AWE64 using the old waveIn/waveOut functions.
- I'm using the very latest AWE64 drivers I can find (straight from Creative's web site).

Has anyone run into a similar problem with simultaneous audio I/O on the AWE64?
0
Comment
Question by:gbeau
  • 6
  • 6
12 Comments
 
LVL 2

Expert Comment

by:gysbert1
ID: 1173195
Make sure that the card is occupying two different DMA channels and possibly two IRQ's ? I remember reading an article in a recent DR Dobbs stating that most full-duplex cards install half-duplex by default to try and conserve DMA channels and IRQ's. It might be that the playback/recording is sharing a DMA channel or IRQ causing the degradation in quality. Maybe the ESS card installs full-duplex by default ?

Worth a look I guess ...
0
 

Author Comment

by:gbeau
ID: 1173196
gysbert1, thanks for the suggestions.  I checked the hardware settings for my AWE64 card.  The "Full-duplex" checkbox *is* checked, so theoretically it should allow simultaneous audio in and out at the same sample rate.  It's using 1 IRQ and 2 DMA channels.  So that all looks OK...  There are a few

The Device Manager gives several optional configurations for the AWE64.  I'll see if any of the other configurations work better.  


0
 
LVL 2

Expert Comment

by:gysbert1
ID: 1173197
I had a look in the specifications for the AWE64.

Apparently there was a driver problem with the full duplex support and you need to get the correct driver.

Have a look on creative's site at http://www-nt-ok.creaf.com/techsupt/faqs/qna0001.html for the correct driver ...
0
 

Author Comment

by:gbeau
ID: 1173198
Great!  Thanks for looking into this!  I'll grab that ASAP and see if it works better.
0
 

Author Comment

by:gbeau
ID: 1173199
Still no joy.  I have more clues, however...

I've got a test program that records and plays back wav files, but using the "wave" calls (waveInOpen, waveOutOpen, etc.) instead of DirectSound & DirectSoundCapture.  It allows you to record into one wav file, while simultaneously playing back another wav file.  Recording and playback can be controlled independently - it has buttons to start/stop recording, and buttons to start/stop playing.

I used 11kHz/16bit/mono for the recording and playback formats.  The program works fine when record and playback are used independently.  When I try to record and playback simultaneously, however, either recording or playback gets distorted, **depending on which one I start first**:
- If I start recording first, then start playback, the recording is clean but the playback is distorted.
- If I start playback first, then start recording, the playback is clean but the recording is distorted.  

I looked at the distorted recorded file carefully in SoundForge.  Zooming in revealed revealed a "staircase" appearance - with the vertical step size of 128.  In other words, the recording was quantized to 8 bits, even though the code was specifying 16 bit format!!

I'll poke around some more and let you know if I come across more clues...
0
 
LVL 2

Expert Comment

by:gysbert1
ID: 1173200
I am sorry to inform you of this but a colleague of mine just told me about exactly that problem !

He was moaning that he had to do the same as you (full duplex audio for video conferencing) and that he read in some magazine that you can only get 16bits one way and 8bits the other. This was of course not mentioned in the AWE64 specs :o(

He eventually started looking for another card (I suggested the ESS based cards you mentioned of course :o)

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:gbeau
ID: 1173201
"He was moaning that he had to do the same as you (full duplex audio for video conferencing) and that he read in some magazine that you can only get 16bits one way and 8bits the other. This was of course not mentioned in the AWE64 specs :o( "

Yikes!!!

BTW, just tried the same full-duplex waveIn/waveOut app on an old Toshiba laptop (which is not using a Creative card), and it works fine too.  I'll contact Creative to find out what the deal is with their cards.  Seems hard to believe that their software wouldn't properly support something which the hardware clearly should be able to handle.  (It does, after all, have a 16 bit A/D and 16 bit D/A - running both shouldn't be a big deal!).

If it is indeed impossible to do simultaneous 16 bit recording and playback on the AWE, that's a *very* serious limitation of their card!  Eg. for anyone using the AWE64 for musical applications (eg. using a MIDI sequencer with built-in multitrack recording).   We've got a lot of people here working on speech recognition and speech synthesis, and naturally they'd like to use the two together.  Even some *games* these days rely on full duplex sound - eg networked games where you can shout at your enemy in a disguised voice before blowing him up :-0.

If your colleague's right about these limitations, then I'll accept your previous comment as an answer!  I'll see whether I can squeeze a definitive answer out of Creative tech support.  Does your colleague remember in what magazine he saw the 8/16 limitation described?


0
 

Author Comment

by:gbeau
ID: 1173202
gysbert1,
I've confirmed what your colleague told you - with information buried in the tech support pages on Creative's site.  From "http://www.soundblaster.com/wwwnew/tech/devcnr/fulldup.html":

<BEGIN QUOTE>
Full-duplex Programming for Creative 16-bit Sound cards
All the 16-bit family sound cards including the SB16, SB AWE32 and Phone Blaster have one 16-bit and one 8-bit DMA channel. It is possible to make use of both DMA channels to create full duplex applications.

Each of the DMA channel can be programmed to perform either wave recording or playback. However, if one of the channel is being used for recording, the other channel must be used for playback. For example, if the 16-bit channel is used for recording, then the 8-bit channel must be used for playback.

In addition, the other restrictions are:

Both operations must be of same sampling rate.
Both operations must be in PCM format, ie., no compression.
<End quote>

So the buggers *don't* support simultaneous 16 bit audio in and out!  And they don't bother putting that in their spec sheet!
0
 

Author Comment

by:gbeau
ID: 1173203
gysbert1,
Feel free to add an answer (quoting from your previous comment and the info I found on Creative's site).  I'll accept the answer (basically that what I want to do is impossible!), you get the points, and we end this thread.  Alternatively, I could just delete the question, and save myself the points, but that would hardly be fair to you :-)  Thanks for your help!
-Gerry
0
 
LVL 2

Accepted Solution

by:
gysbert1 earned 100 total points
ID: 1173204
Sorry but he cannot remember what magazine it was, it was a little more than a month ago.

Apparently the problem is related to the DMA channels on the PC. The AWE64 allocates one 8-bit DMA channel and one 16-bit DMA channel. Although both can be used at the same time the 8-bit channel can not be configured to go double speed and i.e. give 16-bit data through. Apparently this problem has been resolved in the new Soundblaster cards (the Soundblaster Live and the Soundblaster PCI 128) but I do not have any solid proof of this yet.

It seems that Creative are trying to fool people into beleiving that the card can do 16bit 44kHz both ways by saving 8-bit quantized data into a 16-bit buffer.

This problem can of course be overcome by decent software (on both the card's side and the PC side) since as you mentioned they have all the hardware to do it.

I have mailed a few people who might know a bit more. I will post any further information here as comments if I find any.
0
 
LVL 2

Expert Comment

by:gysbert1
ID: 1173205
I got some mail from Arny Krueger who tests soud cards. They have a site at

He had the following to say :

"The AWE64 drivers have always supported full duplex. The hardware prevents
really high-quality operation.

>I have heard reports that it records 8bits the one way when recording
>16bits the other ! Although everything indicates 16bit recoring and
>playback the recorded data (if recording is started after playback) is
>quantized to 8 bits although it is stored as 16bit data !

This is what its performance suggests. All CreativeLabs's ISA cards show this kind of
performance, it comes from how they implement SB Pro support.

0
 
LVL 2

Expert Comment

by:gysbert1
ID: 1173206
Sorry, the site is:
  http://www.pcavtech.com/soundcards/compare/


^  the closing quote
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

948 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now