25 May '13 - 19:15 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: CD Audio & Multiple drives.  (Read 1694 times)
Led
Posts: 40


« on: 21 Jun '02 - 00:03 »
Reply with quoteQuote

Ola.

I'm working on an audioplayer using Bass.
Everything is fine and dandy as yet, but now's the time I want to implement cd-audio too.

My problem is the fact that Bass can only be initialized on a single cd-drive at a time. (? afaik)

First of all, my playlist updates in idle-time so the items get inserted first, and when idle the filesizes / tracklengths etc are being calculated.

For Mods / streams this is not a problem, but for cd-audio it is I guess....
what would happen if the user's playing a track from cd-drive 1 and enqueuing a track from drive 2 ?
the info should be updated in idletime - thus i need to get info from a track on another cd-drive than the one that's currently initialized (and playing..).

Ian, do you have any suggestions..?

Or, to put it another way - If this can't be done could Bass be adapted to suit my needs..? Smiley

Seeya,
Lennart
Logged
Ian @ un4seen
Administrator
Posts: 15276


« Reply #1 on: 21 Jun '02 - 09:56 »
Reply with quoteQuote

BASS_CDInit can only access 1 drive at a time, but what you could do is load a 2nd BASS instance to access the 2nd CD. See the multi.c source file for an example of using multiple BASS instances.
« Last Edit: 21 Jun '02 - 10:02 by Ian @ un4seen » Logged
Kirschsaft
Posts: 8


« Reply #2 on: 21 Jun '02 - 14:52 »
Reply with quoteQuote

There is a second way which is a bit difficult though.
You could use the .cda-files windows is creating when accessing an audio cd.
First you count the files, for getting the number of tracks. Second, you open the files and read the time informations.

You can get informations about the file format at Wotsit.org
Logged
Led
Posts: 40


« Reply #3 on: 21 Jun '02 - 17:41 »
Reply with quoteQuote

I already thought of the CDA-trick Smiley

But the main problem isn't solved - access to multiple drives at the same time.
(In a couple of days I'll probably implement cross-fading - so then I have to *play* 2 cd's at the same time Smiley)

The Multi-bass-instances-thingie seems like a terrible crude hack to me... I'm not anti-hack Smiley but I think this would bring a lot more problems into the system - for each active audio-instance I'll have to keep track of which BassInstance is managing it etc...

Why wouldn't it be possible to initialize more than 1 cd-drive with a single Bass instance ..?
Logged
Ian @ un4seen
Administrator
Posts: 15276


« Reply #4 on: 23 Jun '02 - 11:41 »
Reply with quoteQuote

It is of course technically possible, but BASS currently only supports using 1 CD drive at a time. So the "hack" is the only method available at the moment Smiley

But you will also have problems cross-fading 2 CDs. The problem is CD drives do not have volume controls, it's the soundcard that does. So even if you have 2 soundcards (1 for each CD), there's still no way of knowing which card controls which CD's volume. If you want to do this sort of thing, you're probably better off reading the sample data direct from the CDs, and streaming it.
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines