mirror of
https://github.com/ZDoom/ZMusic.git
synced 2025-02-17 09:02:23 +00:00
- exported the CD utility functions used by ZDoom's CCMD interface.
Do not use unless handling some legacy CD Audio support!
This commit is contained in:
parent
2566f9007f
commit
00bc98db2d
3 changed files with 28 additions and 24 deletions
|
@ -334,6 +334,27 @@ extern "C"
|
|||
|
||||
DLL_IMPORT const ZMusicMidiOutDevice *ZMusic_GetMidiDevices(int *pAmount);
|
||||
|
||||
// Direct access to the CD drive.
|
||||
// Stops playing the CD
|
||||
DLL_IMPORT void CD_Stop();
|
||||
|
||||
// Pauses CD playing
|
||||
DLL_IMPORT void CD_Pause();
|
||||
|
||||
// Resumes CD playback after pausing
|
||||
DLL_IMPORT zmusic_bool CD_Resume();
|
||||
|
||||
// Eject the CD tray
|
||||
DLL_IMPORT void CD_Eject();
|
||||
|
||||
// Close the CD tray
|
||||
DLL_IMPORT zmusic_bool CD_UnEject();
|
||||
|
||||
// Closes a CD device previously opened with CD_Init
|
||||
DLL_IMPORT void CD_Close();
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
#include <stdlib.h>
|
||||
#include "zmusic_internal.h"
|
||||
#include "helperthread.h"
|
||||
#include "i_cd.h"
|
||||
|
||||
|
@ -513,7 +514,7 @@ bool CD_InitID (unsigned int id, int guess)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void CD_Close ()
|
||||
DLL_EXPORT void CD_Close ()
|
||||
{
|
||||
if (Inited != NOT_INITED)
|
||||
{
|
||||
|
@ -528,7 +529,7 @@ void CD_Close ()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void CD_Eject ()
|
||||
DLL_EXPORT void CD_Eject ()
|
||||
{
|
||||
if (Inited != NOT_INITED)
|
||||
CDThread->SendMessage (CDM_Eject, 0, 0, 0, false);
|
||||
|
@ -540,7 +541,7 @@ void CD_Eject ()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
bool CD_UnEject ()
|
||||
DLL_EXPORT zmusic_bool CD_UnEject ()
|
||||
{
|
||||
if (Inited == NOT_INITED)
|
||||
return false;
|
||||
|
@ -554,7 +555,7 @@ bool CD_UnEject ()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void CD_Stop ()
|
||||
DLL_EXPORT void CD_Stop ()
|
||||
{
|
||||
if (Inited != NOT_INITED)
|
||||
CDThread->SendMessage (CDM_Stop, 0, 0, 0, false);
|
||||
|
@ -618,7 +619,7 @@ void CD_PlayCDNoWait (bool looping)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void CD_Pause ()
|
||||
DLL_EXPORT void CD_Pause ()
|
||||
{
|
||||
if (Inited != NOT_INITED)
|
||||
CDThread->SendMessage (CDM_Pause, 0, 0, 0, false);
|
||||
|
@ -630,7 +631,7 @@ void CD_Pause ()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
bool CD_Resume ()
|
||||
DLL_EXPORT zmusic_bool CD_Resume ()
|
||||
{
|
||||
if (Inited == NOT_INITED)
|
||||
return false;
|
||||
|
|
|
@ -54,9 +54,6 @@ bool CD_Init (int device = -1);
|
|||
// Open a CD device containing a specific CD. Tries device guess first.
|
||||
bool CD_InitID (unsigned int id, int guess=-1);
|
||||
|
||||
// Closes a CD device previously opened with CD_Init
|
||||
void CD_Close ();
|
||||
|
||||
// Plays a single track, possibly looping
|
||||
bool CD_Play (int track, bool looping);
|
||||
|
||||
|
@ -67,21 +64,6 @@ bool CD_PlayCD (bool looping);
|
|||
void CD_PlayNoWait (int track, bool looping);
|
||||
void CD_PlayCDNoWait (bool looping);
|
||||
|
||||
// Stops playing the CD
|
||||
void CD_Stop ();
|
||||
|
||||
// Pauses CD playing
|
||||
void CD_Pause ();
|
||||
|
||||
// Resumes CD playback after pausing
|
||||
bool CD_Resume ();
|
||||
|
||||
// Eject the CD tray
|
||||
void CD_Eject ();
|
||||
|
||||
// Close the CD tray
|
||||
bool CD_UnEject ();
|
||||
|
||||
// Get the CD drive's status (mode)
|
||||
ECDModes CD_GetMode ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue