Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Enable 4channel audio output on Maya 44 USB

Posted on 2009-05-18
2
Medium Priority
?
461 Views
Last Modified: 2013-12-08
Hello,

I've got code that plays 4 different waveforms on the 4 outputs of a quadrophonic sound card. It works fine when using the SoundBlaster Audigy card inside my computer, but it fails when using the Maya 44 USB card with which it is intended to work. The output in this case is limited to just 2 channels (front left+front right), the other two (back left, back right) being muted. The code uses DirectX and initializes the buffer using the code below. I tried to look at the mixer of the Maya card, also at the configuration of speakers of it and everything seems to be right - no muting and quadrophonic speakers. How do I enable the other 2 channels, either by code or by clicking somewhere in Windows?

Thanks a lot
// Create buffer
  DSBUFFERDESC dsbd;
  WAVEFORMATPCMEX wfex;
  wfex.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
  wfex.Format.nChannels = 4;
  wfex.Format.nSamplesPerSec = 44100L;
  wfex.Format.nAvgBytesPerSec = 352800L; 
  wfex.Format.nBlockAlign = 8;  /* Same as the usual */
  wfex.Format.wBitsPerSample = 16;
  wfex.Format.cbSize = 22;  /* After this to GUID */
  wfex.Samples.wValidBitsPerSample = 16;  /* All bits have data */
  wfex.dwChannelMask = SPEAKER_FRONT_LEFT | 
                       SPEAKER_FRONT_RIGHT | 
                       SPEAKER_BACK_LEFT |
                       SPEAKER_BACK_RIGHT;
  wfex.SubFormat = KSDATAFORMAT_SUBTYPE_PCM;  // Specify PCM  
 
  dsbd.dwSize = sizeof( dsbd);
  dsbd.dwFlags = DSBCAPS_CTRLVOLUME | DSBCAPS_STICKYFOCUS | DSBCAPS_CTRLPOSITIONNOTIFY;
  // Prepare sound for 200 milliseconds
  // NOTE: We must make sure that the number is always even 
  // because of the way we fill in the buffer
  const int nSamples = wfex.Format.nSamplesPerSec / 5 + (wfex.Format.nSamplesPerSec / 5)  % 2;
  dsbd.dwBufferBytes = nSamples * wfex.Format.nChannels * (wfex.Format.wBitsPerSample / 8);
  dsbd.dwReserved = 0;
  dsbd.lpwfxFormat = &wfex.Format;
  dsbd.guid3DAlgorithm = GUID_NULL;
  if (FAILED(intOutputSound.lpds->CreateSoundBuffer( &dsbd, &intOutputSound.lpBuffer, 0)) || 
      !intOutputSound.lpBuffer) 
      return false;

Open in new window

0
Comment
Question by:bovlk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 26

Assisted Solution

by:PCBONEZ
PCBONEZ earned 2000 total points
ID: 24502319
You do have all 4 RCA cables connected on the input side,,, yes?
Those wouldn't be there if you could get 4 channels through USB.

My reading suggests the install loads generic drivers that you then have to go in and update to the correct drivers manually.
0
 

Accepted Solution

by:
bovlk earned 0 total points
ID: 24578761
Yes, I have all 4 channels connected. I solved the problem by using ASIO instead of DirectX meanwhile so I'm not sure whom to award the points.
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

660 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