Add routine to turn audio status into a string.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* Common Multimedia Command (MMC) routines.
|
||||
|
||||
$Id: mmc.c,v 1.20 2005/03/06 00:03:53 rocky Exp $
|
||||
$Id: mmc.c,v 1.21 2005/03/06 02:59:26 rocky Exp $
|
||||
|
||||
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -68,6 +68,30 @@ audio_read_subchannel_mmc ( void *p_user_data, cdio_subchannel_t *p_subchannel)
|
||||
return mmc_audio_read_subchannel(p_env->cdio, p_subchannel);
|
||||
}
|
||||
|
||||
/*!
|
||||
Return a string containing the name of the audio state as returned from
|
||||
the Q_SUBCHANNEL.
|
||||
*/
|
||||
const char *mmc_audio_state2str( uint8_t i_audio_state )
|
||||
{
|
||||
switch(i_audio_state) {
|
||||
case CDIO_MMC_READ_SUB_ST_INVALID:
|
||||
return "invalid";
|
||||
case CDIO_MMC_READ_SUB_ST_PLAY:
|
||||
return "playing";
|
||||
case CDIO_MMC_READ_SUB_ST_PAUSED:
|
||||
return "paused";
|
||||
case CDIO_MMC_READ_SUB_ST_COMPLETED:
|
||||
return "completed";
|
||||
case CDIO_MMC_READ_SUB_ST_ERROR:
|
||||
return "error";
|
||||
case CDIO_MMC_READ_SUB_ST_NO_STATUS:
|
||||
return "no status";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
Get the block size for subsequest read requests, via MMC.
|
||||
@return the blocksize if > 0; error if <= 0
|
||||
|
||||
Reference in New Issue
Block a user