A bare bones framework for audio DSP on a PC - Page 4 - diyAudio
Go Back   Home > Forums > Source & Line > PC Based

PC Based Computer music servers, crossovers, and equalization

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 3rd August 2012, 04:34 PM   #31
boris81 is offline boris81  United States
diyAudio Member
 
Join Date: Oct 2009
Location: white plains, ny
My understanding is that USB 1.1 supports only 2 channels of audio.
"Multichannel" USB1.1 devices send 2 channels(L&R) over the wire, then a processor inside the box does a Surround sound conversion and you magically get 5.1 channels.

So if you want to use USB you need a USB 2.0 device which can support multichannel audio (or Firewire). Those devices are much more expensive and require custom drivers so they are not exactly plug and play. Fortunately the custom drivers usually include multichannel ASIO support.

I suspect that the ASIO4ALL driver just shows multiple channels but has no way of sending data to them.
  Reply With Quote
Old 3rd August 2012, 07:56 PM   #32
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
cm6206 supports 8 simultaneous 48/16 channels which is still within USB 1.1 capacity. This is what a cheap cm6206-based usb card with 8 channels (6 analog plus 2 spdif) reports about its capabilities in linux:

Code:
pavel@nahore:~$ cat /proc/asound/card3/stream0
USB Sound Device at usb-0000:00:10.2-1, full speed : USB Audio

Playback:
  Status: Running
    Interface = 1
    Altset = 1
    URBs = 3 [ 8 8 8 ]
    Packet Size = 784
    Momentary freq = 48000 Hz (0x30.0000)
  Interface 1
    Altset 1
    Format: S16_LE
    Channels: 8
    Endpoint: 6 OUT (ADAPTIVE)
    Rates: 44100, 48000
  Interface 1
    Altset 2
    Format: S16_LE
    Channels: 2
    Endpoint: 6 OUT (ADAPTIVE)
    Rates: 44100, 48000
  Interface 1
    Altset 3
    Format: S16_LE
    Channels: 4
    Endpoint: 6 OUT (ADAPTIVE)
    Rates: 44100, 48000
  Interface 1
    Altset 4
    Format: S16_LE
    Channels: 6
    Endpoint: 6 OUT (ADAPTIVE)
    Rates: 44100, 48000
  Interface 1
    Altset 5
    Format: S16_LE
    Channels: 2
    Endpoint: 6 OUT (ADAPTIVE)
    Rates: 96000

Capture:
  Status: Running
    Interface = 2
    Altset = 1
    URBs = 8 [ 1 1 1 1 1 1 1 1 ]
    Packet Size = 200
    Momentary freq = 48000 Hz (0x30.0000)
  Interface 2
    Altset 1
    Format: S16_LE
    Channels: 2
    Endpoint: 5 IN (ASYNC)
    Rates: 44100, 48000
IMO the windows driver just does not choose the requested altset (alternate setting) of the card.
  Reply With Quote
Old 3rd August 2012, 08:19 PM   #33
boris81 is offline boris81  United States
diyAudio Member
 
Join Date: Oct 2009
Location: white plains, ny
OK, I looked it up and it turns out the CM6206 is USB2.0 compliant.
Steph, if you have an old computer the some of the USB ports might not be USB2.0
  Reply With Quote
Old 4th August 2012, 02:36 AM   #34
diyAudio Member
 
steph_tsf's Avatar
 
Join Date: Mar 2008
Hello, thanks for helping me clarifying the situation with Realtek HD Audio (motherboard sound), CM106-based multichannel USB Sound Cards, and CM6206-based multichannel USB Sound Cards. Before using them with CopperTop bare bones framework, I checked their behavior when coupled to ASIO4ALL. The first test is to use ASIOSinGen. A more flexible test is to design and run a little Synthmaker template.

REALTEK HD Audio (motherboard sound system)

Need to install the Realtek High Definition Audio driver. Need to activate the Realtek High Definition Audio in the System Control Panel. Nothing special here. If Winamp plays and outputs sound, it means all this got properly done when you installed WinXP.

Synthmaker « test all outputs.osm » and ASIO4ALL, on a laptop computer :
cursor 1 is the left speaker
cursor 2 is the right speaker
cursor 3 sends sound to left and right speakers
cursor 5, 6, 7, 8 send some muted sound to the left and right speakers too


CM106-based TRUST SC-5500p USB Multichannel 5.1 Audio

DO NOT install the driver that’s supplied with the 5.1 adapter. Windows already has the USB Audio driver installed. You can check this by playing a song using Winamp. If there is sound on the FRONT port, it means WinXP has the USB Audio driver installed and activated. As Winamp only can output 2 channels, the REAR and SUB/CEN ports remain muted.

Synthmaker « test all outputs.osm » and ASIO4ALL :
FRONT = cursor 1 / cursor 2
REAR = cursor 5 / cursor 6
SUB/CEN = cursor 3 / cursor 4


CM6206-based SWEEX USB Multichannel 7.1 Audio

DO NOT install the driver that’s supplied with the 7.1 adapter. Windows already has the USB Audio driver installed. You can check this by playing a song using Winamp. If there is sound on the FRONT port, it means WinXP has the USB Audio driver installed and activated. As Winamp only can output 2 channels, the SURROUND, CENTER/BASS and BACK ports remain muted.

Synthmaker « test all outputs.osm » and ASIO4ALL :
FRONT = cursor 1 / cursor 2
SURROUND = cursor 7 / cursor 8
CENTER/BASS = cursor 3 / cursor 4
BACK = cursor 5 / cursor 6


CM6206-based « China import » Multichannel 5.1 Audio

Playing a song with Winamp : NO SOUND if the specific 5.1 driver doesn’t get installed. After having installed the specific 5.1 driver : Winamp plays. In a strange way. FRONT OUT = REAR OUT = CEN / BASS OUT = Left and Right.

Synthmaker « test all outputs.osm » and ASIO4ALL :
FRONT OUT= cursor 1 / cursor 2
REAR OUT= cursor 1 / cursor 2 + cursor 7 / cursor 8
CEN / BASS OUT = cursor 1 / cursor 2 + cursor 3 / cursor 4
This is problematic. The "China import" hardware only can output 4 independent channels, not 6 channels.

WARNING : if the specific 5.1 driver is installed, the CM6206 SWEEX USB Multichannel 7.1 Audio will be affected, and will behave as bad as the CM6206 « China Import ». The CM106 TRUST SC-5500p will remain unaffected.

Question : as both the Sweex 7.1 and the China import are basing on a single CM6206 chip without external EEPROM, how can they behave differently?
Attached Images
File Type: jpg ASIOSigGen.jpg (123.8 KB, 94 views)
File Type: jpg test all outputs.jpg (283.8 KB, 92 views)
Attached Files
File Type: zip test all outputs.zip (116.2 KB, 2 views)

Last edited by steph_tsf; 4th August 2012 at 02:44 AM.
  Reply With Quote
Old 4th August 2012, 03:36 AM   #35
diyAudio Member
 
steph_tsf's Avatar
 
Join Date: Mar 2008
Just for the fun, here is a trivial mono 2-way crossover made using Synthmaker. The signal source is an "Additive Osc" provided by Synthmaker. By changing the delay, you change the highpass slope. There is an optimum around the value of 10. You can hear this if you reduce the Bass amplitude.

This is working nice on my laptop using:
- the onboard Realtek High Definition Audio
- the CM106-based Trust SC-5500p 5.1 USB Audio
- the CM6206-based Sweex 7.1 USB Audio
all driven by ASIO4ALL.

Giving this, I guess the CooperTop bare bones framework should work now. Well, no luck, I can't get it working. There is no sound coming out.

The problem may be in the way the devices get presented and selected in console mode. It would be handy to have the ASIO4ALL control panel opening while specifying the devices in console mode. It would be reassuring to see the user choices being confirmed by the ASIO4ALL control panel changing accordingly.

At the moment, if there are two or more devices able to run under ASIO4ALL (like HD Audio and USB Audio), the CooperTop framework only detects one of the two.

I have a question about
BOOL BASS_ASIO_ControlPanel();

By adding one line in the source code
BASS_ASIO_ControlPanel();
are we supposed to have the ASIO control panel opening ?

In CopperTop console mode, it would be nice to have a possibility for halting the streams, enabling to modify settings in the ASIO control panel, then enable the streams again.

What's the situation if relying on ASIO4ALL ? Is it fundamentally different from running a dedicated ASIO driver written for a specific hardware?

Any reply welcome.
Attached Images
File Type: jpg mono 2-way LVDC XO.jpg (277.0 KB, 92 views)
File Type: jpg Realtek HD Audio.jpg (83.5 KB, 91 views)
Attached Files
File Type: zip mono 2-way LVDC XO.zip (169.0 KB, 2 views)

Last edited by steph_tsf; 4th August 2012 at 03:45 AM.
  Reply With Quote
Old 4th August 2012, 09:25 AM   #36
diyAudio Member
 
Join Date: Feb 2009
Location: UK
Quote:
Originally Posted by steph_tsf View Post
I have a question about
BOOL BASS_ASIO_ControlPanel();
It works for me, if placed after BASS_ASIO_Init().

(screenshot for a Creative Audigy card with Kx drivers that I happen to have in this particular PC)
Attached Images
File Type: jpg ASIO screenshot.jpg (29.9 KB, 88 views)
  Reply With Quote
Old 4th August 2012, 04:06 PM   #37
diyAudio Member
 
steph_tsf's Avatar
 
Join Date: Mar 2008
Thanks for the advice. I just added the instruction. Now I have the ASIO control panel opening like you did. My ASIO control panel is ASIO4ALL.

I introduced a few printf ("xx\n"); lines in the code, for monitoring if on my side, the execution is reaching the latest main() stage which is : while (1) { Sleep (500); } return 1; }.

Actually it is not.

See the screen hardcopy.
You can see three interesting facts :
1 - the CPU usage is high (symbol on the WinXP taskbar)
2 - ASIO is on pause (symbol on the WinXP taskbar)
3 - the application only completes stages AB instead of ABCD

Which means that the callbacks don't work. This is the issue.

I'm putting the CodeBlocks project on a .zip
Can you please check if the project is running fine on your side?

Strange also, each time I reboot the computer, when running the CopperTop stuff, I have AVG antivirus popping up telling me there is a security thread. To AVG, I tell "keep it" instead of "putting in quarantaine". Could it be there is a pointer or something related, going weird? How to check this?

Steph
Attached Images
File Type: jpg 1 - warnings at build.jpg (114.3 KB, 18 views)
File Type: jpg 2 - security warning after entering the recording device ID.jpg (255.0 KB, 14 views)
File Type: jpg 3 - high CPU usage - ASIO on pause - only completes AB stages.jpg (144.9 KB, 15 views)
Attached Files
File Type: zip CopperTop.zip (495.7 KB, 2 views)
  Reply With Quote
Old 4th August 2012, 05:11 PM   #38
diyAudio Member
 
Join Date: Feb 2009
Location: UK
Hello Steph

With your main.cpp placed in my Codeblocks project and renamed as main.c, everything works fine after compilation: I select the source and destination when prompted, the ASIO panel pops up and waits for me to press 'OK', then the console displays A B C D, and music starts coming out of the headphones. CPU usage as displayed in Windows Task manager is about 1%.

If I run your pre-compiled .exe file (having moved it into the same folder as bass.dll because presumably I haven't got the paths set up properly), I get the same as you: the code only gets as far as A B, and the CPU usage is high.

I enclose my compiled version of your source to try.
Attached Files
File Type: zip Coppertop's version.zip (12.4 KB, 6 views)

Last edited by CopperTop; 4th August 2012 at 05:16 PM.
  Reply With Quote
Old 4th August 2012, 06:14 PM   #39
diyAudio Member
 
Join Date: Feb 2009
Location: UK
I also took your complete project and ran it. I got errors at first because the libraries were in a different location, but once I had added BASS.lib and BASS_ASSIO.lib in the linker options I hit F9 to build and run, and everything was fine. I got the same 7 warnings as you, and everything worked OK.

The only difference seems to be that I'm using BASS 2.4.8.0 and you're on 2.4.9.0 (although I was probably just running with the 2.4.9.0 .dll in your project).

This must be a simple problem to solve! I think I may create another project that contains all the libraries and source files with relative paths rather than relying on absolute paths then post the complete project for you to try.

Edit: here's the self-contained project using relative paths I think. In theory, you shouldn't need to have BASS installed on your system to load, compile and run this project. It seems to work fine for me.
Attached Files
File Type: zip CopperTop self contained project.zip (505.0 KB, 8 views)

Last edited by CopperTop; 4th August 2012 at 06:35 PM.
  Reply With Quote
Old 4th August 2012, 07:31 PM   #40
diyAudio Member
 
steph_tsf's Avatar
 
Join Date: Mar 2008
Quote:
Originally Posted by CopperTop View Post
It works for me, if placed after BASS_ASIO_Init(). Using Creative Audigy card with Kx drivers that I happen to have in this particular PC
Need to be careful about the Creative Audigy hardware and Kx drivers.
In your Kx ASIO control panel it reads "Device : SB0243"

I went on kX Project -- FAQ (Frequently asked questions). It reads :

Question:
Which soundcards can I use with the kX driver?

Answer:
Currently, kX-compatible soundcards include all EMU10k1 and EMU10k2-based PC soundcards manufactured by Creative Technology Ltd. and/or E-mu Systems Inc., including:
The E-mu Audio Production Studio (APS) card
The motherboard models of 10k1 cards (M002, M003 and others)
PCI256 (CT4890, CT4891 and CT4893) and PCI512 (CT4820 and SB0150) including OEM model (CT4790)
The original Live! (CT4620) and Live! Value cards (CT4670)
The Live! X-Gamer, Live! MP3+, Live! Player 1024, Live! Platinum cards (CT4760) and value cards (CT4780)
The Live! X-Gamer 5.1, Live! MP3+ 5.1, Live! Player 5.1, Live! Platinum 5.1, Live! Digital Entertainment 5.1 cards (SB0060, SB0100, SB0102, SB0220, SB0222, SB0103 and SB0105) and Value 5.1 (SB0101)
The generic and custom OEM Live cards (CT4830, CT4831, CT4832, CT4850, CT4870, CT4871 and CT4872)
The Audigy series, including the Audigy MP3+, X-Gamer, Platinum and OEM cards (CT0070, CT0072, SB0090 and SB0092).
The Audigy 2 series, including Gamer, Platinum, Platinum eX and OEM cards (SB0242, SB0244, SB0320, SB0240, SB0240P, SB0280).
The Audigy 2 ZS series, including Audigy 2 ZS Gamer, Platinum and OEM cards (SB0350).
The Audigy 2 ZS Platinum Pro is not fully supported yet. There are issues with the line in ADC.

24/96 support for the Audigy 2 and Audigy 2 ZS cards is under development.
Audigy 2 Value (SB0400), Audigy 2 ZS Notebook (SB0350) and Audigy 4 Pro (SB0380) cards are partially supported.
The Dell OEM SB Live! (SB020x) is not yet supported since it uses a custom version of the EMU10k1, whose details are unknown. Experimental support may be provided when more information about it becomes available.
Soundblaster Live! 5.1 cards (SB022x) are supported.
Soundblaster Live! 24 Bit and Audigy LS are incompatible with kX, since they do not use the 10kX chips.

Audigy2 ZS Notebook is supported, although some limitations apply.
E-mu E-DSP based PCI devices are supported (0404, 1212, 1820, ...).
Extigy is NOT supported and will not be supported.
X-Fi is NOT supported and will not be supported.


On Creative Labs website, the only remaining internal sound cards are :

Sound Blaster Audigy SE (PCI) (39,99 eur)
Sound Blaster X-Fi Xtreme Audio (PCI Express) (69.99 eur)
Sound Blaster X-Fi Titanium HD (PCI Express) (179.99 eur)

There is Creative Worldwide Support webpage showing the ID numbers for all Sound Blaster products.
The SB0243 (showing on your Kx ASIO driver control panel) is known as "Audigy 2", indeed supported by the Kx ASIO driver.
Unfortunately, from Creative Worldwide Support Audigy 2 webpage the situation about SB0243 is "The product you have selected has been classified as End of Service Life".

Therefore on top of running on Creative Audigy 2, it would be nice to have the bare bones framework also running on proletarian multichannel audio chips like Realtek HD Audio, C-Media CM106, and C-Media CM6206.

There may be another proletarian multichannel audio chip, quite interesting.
The Sound Blaster X-Fi Surround 5.1 Pro (USB) (54.99 eur) (identified as SB1095) features the following playback specification:
USB 2.0: Stereo 24-bit/96kHz or Surround 24-bit/96kHz
USB 1.1: Stereo 24-bit/96kHz or Surround 16-bit/48kHz
This is thus better than CM6206. What's the chip inside? A nice feature is the hardware volume potentiometer. Hope this works under ASIO4ALL.

P.S.
Thanks for your precious help.
Tomorrow I will be investigating the CodeBlocks compiler settings, BASS and BASSASIO versions, also the directory tree, for getting the bare bones framework reaching stages ABCD on my side. From what I understand, my idea of adding a code line for opening the ASIO driver control panel is dangerous, as some control panels, once open (like Kx ?) seem to pause ASIO, thus require the user to press the "OK" button for getting ASIO playing again. In ASIO4ALL there is no such "OK" button so I'm assuming that opening the ASIO4ALL control panel doesn't pause ASIO. Right?
Attached Images
File Type: jpg Creative Sound Blaster X-Fi Surround 5.1 Pro USB.jpg (31.1 KB, 19 views)

Last edited by steph_tsf; 4th August 2012 at 07:54 PM.
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FS: Frequency Allocator PC crossover and DSP program jdubs Swap Meet 2 16th May 2012 03:28 AM
What DSP is suitable for audio? Snickers-is Parts 2 1st June 2006 03:50 AM
PC DSP crossover. Anyone interested in testing? Thunau Multi-Way 0 26th February 2006 11:14 PM
DSP Audio reverb Gold_xyz Digital Source 0 13th December 2005 03:54 PM
How come the bones in take-out chicken are so soft? Cal Weldon The Lounge 6 5th February 2005 02:32 PM


New To Site? Need Help?

All times are GMT. The time now is 09:54 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright ©1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2