Add cdio_audio_get_msf_seconds
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/* -*- c -*-
|
/* -*- c -*-
|
||||||
$Id: audio.h,v 1.6 2005/03/06 11:21:52 rocky Exp $
|
$Id: audio.h,v 1.7 2005/03/06 15:59:20 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2005 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2005 Rocky Bernstein <rocky@panix.com>
|
||||||
|
|
||||||
@@ -71,6 +71,18 @@ extern "C" {
|
|||||||
driver_return_code_t cdio_audio_get_volume (CdIo_t *p_cdio, /*out*/
|
driver_return_code_t cdio_audio_get_volume (CdIo_t *p_cdio, /*out*/
|
||||||
cdio_audio_volume_t *p_volume);
|
cdio_audio_volume_t *p_volume);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Return the number of seconds (discarding frame portion) of an MSF
|
||||||
|
*/
|
||||||
|
uint32_t cdio_audio_get_msf_seconds(msf_t *p_msf);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
Pause playing CD through analog output
|
||||||
|
|
||||||
|
@param p_cdio the CD object to be acted upon.
|
||||||
|
*/
|
||||||
|
driver_return_code_t cdio_audio_pause (CdIo_t *p_cdio);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Pause playing CD through analog output
|
Pause playing CD through analog output
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: audio.c,v 1.5 2005/03/06 11:21:52 rocky Exp $
|
$Id: audio.c,v 1.6 2005/03/06 15:59:20 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2005 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2005 Rocky Bernstein <rocky@panix.com>
|
||||||
|
|
||||||
@@ -25,9 +25,18 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cdio/cdio.h>
|
#include <cdio/cdio.h>
|
||||||
|
#include <cdio/util.h>
|
||||||
#include <cdio/audio.h>
|
#include <cdio/audio.h>
|
||||||
#include "cdio_private.h"
|
#include "cdio_private.h"
|
||||||
|
|
||||||
|
/* Return the number of seconds (discarding frame portion) of an MSF */
|
||||||
|
unsigned int
|
||||||
|
cdio_audio_get_msf_seconds(msf_t *p_msf)
|
||||||
|
{
|
||||||
|
return
|
||||||
|
cdio_from_bcd8(p_msf->m)*CDIO_CD_SECS_PER_MIN + cdio_from_bcd8(p_msf->s);
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Get volume of an audio CD.
|
Get volume of an audio CD.
|
||||||
|
|
||||||
@@ -124,7 +133,7 @@ cdio_audio_resume (CdIo_t *p_cdio)
|
|||||||
{
|
{
|
||||||
if (!p_cdio) return DRIVER_OP_UNINIT;
|
if (!p_cdio) return DRIVER_OP_UNINIT;
|
||||||
|
|
||||||
if (!p_cdio->op.audio_resume) {
|
if (p_cdio->op.audio_resume) {
|
||||||
return p_cdio->op.audio_resume(p_cdio->env);
|
return p_cdio->op.audio_resume(p_cdio->env);
|
||||||
} else {
|
} else {
|
||||||
return DRIVER_OP_UNSUPPORTED;
|
return DRIVER_OP_UNSUPPORTED;
|
||||||
@@ -160,7 +169,7 @@ cdio_audio_stop (CdIo_t *p_cdio)
|
|||||||
{
|
{
|
||||||
if (!p_cdio) return DRIVER_OP_UNINIT;
|
if (!p_cdio) return DRIVER_OP_UNINIT;
|
||||||
|
|
||||||
if (!p_cdio->op.audio_stop) {
|
if (p_cdio->op.audio_stop) {
|
||||||
return p_cdio->op.audio_stop(p_cdio->env);
|
return p_cdio->op.audio_stop(p_cdio->env);
|
||||||
} else {
|
} else {
|
||||||
return DRIVER_OP_UNSUPPORTED;
|
return DRIVER_OP_UNSUPPORTED;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ _cdio_list_prepend
|
|||||||
_cdio_malloc
|
_cdio_malloc
|
||||||
_cdio_strfreev
|
_cdio_strfreev
|
||||||
_cdio_strsplit
|
_cdio_strsplit
|
||||||
|
cdio_audio_get_msf_seconds
|
||||||
cdio_audio_get_volume
|
cdio_audio_get_volume
|
||||||
cdio_audio_pause
|
cdio_audio_pause
|
||||||
cdio_audio_play_msf
|
cdio_audio_play_msf
|
||||||
|
|||||||
Reference in New Issue
Block a user