Page 1 of 1

CD Playback problem in custom interface module

Posted: 22 May 2010 05:26
by tomleonard
Aloha,

We are porting a custom interface module to VLC 1.0.5 on OS/X 10.6, and are having trouble figuring out how to make CD playback of an individual track, work.

The request we made was to play "cdda:///dev/rdisk1", having set the "cdda-track" global variable to the desired track number. We get an error:

"Cant open the MRL 'cdda:///dev/rdisk1'. Check log for details."

Could you please point us to the code in the macosx interface that performs this task. What we are really looking for is the code that manages the behavior when the user double-clicks on a CD track in the playlist.

Thanks

Tom

Our code:

Code: Select all

void VLCPtr::PlayCD(const wxString &idName, wxUint32 trackNum, wxInt32 timeout_ms) { // ___ Make sure nothing else is playing WaitStop(timeout_ms); // add the track number variable if (var_Type(m_pPlayList, "cdda-track") == 0) var_Create(m_pPlayList, "cdda-track", VLC_VAR_INTEGER); var_SetInteger(m_pPlayList, "cdda-track", trackNum); // ___ Play it #ifdef __VLC_0_8_6c__ playlist_LockClear(m_pPlayList); playlist_Add(m_pPlayList, idName.c_str(), NULL, PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END); #else playlist_Clear(m_pPlayList, false); playlist_Add(m_pPlayList, idName.utf8_str(), NULL, PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, true, false); #endif // this shouldn't be necessary if PLAYLIST_GO flag is set //playlist_Play(m_pPlayList); playlist_Next(m_pPlayList); }

Re: CD Playback problem in custom interface module

Posted: 23 May 2010 12:22
by Jean-Baptiste Kempf
Please send the log.

Re: CD Playback problem in custom interface module

Posted: 24 May 2010 01:39
by tomleonard
Thanks JB.

Found it from the log. Had an extra backslash following the device string.

Tom

Re: CD Playback problem in custom interface module

Posted: 25 May 2010 11:40
by Jean-Baptiste Kempf
cool :D