0
0

Hi @ all,

Is it possible to determine detailed information about a CD-ROM-Drive ?

I tried using the (WinAPI-)Function CreateFile/ or DeviceIoControl, but if the specific device is locked by FMOD (-> if the playback was previously started) there is no access possible.

Thx in advance… ๐Ÿ˜‰

  • You must to post comments
0
0

Hi,

which information do you want? FmodEx provide much information I think.

regards
slajar

  • You must to post comments
0
0

Hi slajar,

Thx for ur reply…

Hm e.g.:

  • Manufacturer-Description of the device
  • Size (in Bytes etc.) of each track
  • Size of the hole (currently inserted) Audio-Disc
  • Device Type (DVD/CD, Reader/Writer, …)
  • Device Speed (e.g. 24X – write, 48X – read)
  • Serial Number of the Device
  • Firmware Version
  • Buffer Size
  • Firmware Date
  • You must to post comments
0
0

Hi,

you might look into getNumCDROMDrives and getCDROMName. There you will get the name of the CDROM drive. With createStream and getNumSubSounds you will get the count of titles on th CD. In order to use getLength on the sound object with parameter FMOD_TIMEUNIT_RAWBYTES you will get the size in Bytes per track. Just summarize them all and you will have the size of the whole CD.

I am not sure if Device type, Speed, Serial Number, firmware version, buffer sizes and others are possible to retrieve by fmodex. I am sure they won’t be in the future either. In this case case you should use the OS functions, but be aware fmodex will lock up the CDROM exclusivly. I would propose to retrieve this information in advance and after that you can startup fmodex. This information shouldn’t change during your normal application work flow. I have never seen a "Hotplug CDROM drive" ๐Ÿ˜‰ All medium dependent information can be retrieved as descriebed above.

regards
slajar

  • You must to post comments
0
0

[b:2nrd1rye][u:2nrd1rye]WOW! Thank you very much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!![/u:2nrd1rye][/b:2nrd1rye]

But this doean’t work, dont know why…:
[quote:2nrd1rye]
In order to use getLength on the sound object with parameter FMOD_TIMEUNIT_RAWBYTES you will get the size in Bytes per track.
[/quote:2nrd1rye]

This is my code:
[code:2nrd1rye]
bool CPlayback::GetTotalDiscSize(unsigned int& uiByteCount)
{
int iTotalTracks = 0;
if(!this->GetTotalCDTracks(iTotalTracks) && iTotalTracks != 0)
return (false);

for(register int iCount = 0; iCount < iTotalTracks; iCount++)
{
    FMOD_RESULT  FModResultCode;
    unsigned int uiCDBytePart = 0;
    FModResultCode = this->_pFModCDTracks.at(iCount)->getLength(&uiCDBytePart, FMOD_TIMEUNIT_RAWBYTES);
    if(FModResultCode == FMOD_OK  && uiCDBytePart != 0xFFFFFFFF)
    {
        uiByteCount += uiCDBytePart;
        char buf[67];wsprintf(buf, "%d", uiCDBytePart);MessageBox(0,buf,0,0);
    }
    if(FModResultCode != FMOD_OK)
        return (false);
}  
return (true);

}

bool CPlayback::GetCDTrackSize(int iTrackIndex, unsigned int& uiByteCount)
{
if(!this->_fSourceInit)
return (false);

// Audio-CD initialized ?
if(this->_stSrcType == SRC_DISC)
{
    FMOD_RESULT  FModResultCode;
    unsigned int uiTrackBytes;
    FModResultCode = this->_pFModCDTracks.at(
                        (iTrackIndex == -1 ?
                         this->_pFModCDTracks.size() - 1 :
                         iTrackIndex))->getLength(&uiTrackBytes, FMOD_TIMEUNIT_RAWBYTES);
    if(FModResultCode == FMOD_OK  && uiTrackBytes != 0xFFFFFFFF)
    {
        uiByteCount = uiTrackBytes;
        return (true);
    }
}
return (false);

}
[/code:2nrd1rye]

Have a look at the MessageBox(…)-Ouput in the code above …it always displays zero :(

The Method GetTotalCDTracks() determines a correct value (i checked that)…

Info:
‘this->_pFModCDTracks’ is a std::vector-Object (C++, part of the STL)

Thx again for ur great explanation!!!!!!

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.