libcdio  0.82
audio.h
Go to the documentation of this file.
00001 /* -*- c -*-
00002     $Id: audio.h,v 1.12 2008/03/25 15:59:08 karl Exp $
00003 
00004     Copyright (C) 2005, 2007, 2008 Rocky Bernstein <rocky@gnu.org>
00005 
00006     This program is free software: you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation, either version 3 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00018 */
00019 
00026 #ifndef __CDIO_AUDIO_H__
00027 #define __CDIO_AUDIO_H__
00028 
00029 #include <cdio/types.h>
00030 
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif /* __cplusplus */
00034 
00036   typedef struct cdio_subchannel_s 
00037   {
00038     uint8_t format;
00039     uint8_t audio_status;
00040     uint8_t address:    4;
00041     uint8_t control:    4;
00042     uint8_t track;
00043     uint8_t index;
00044     msf_t   abs_addr;
00045     msf_t   rel_addr;
00046   } cdio_subchannel_t;
00047   
00049   typedef struct cdio_audio_volume_s
00050   {
00051     uint8_t level[4];
00052   } cdio_audio_volume_t;
00053   
00054 
00056   typedef struct cdio_track_index_s
00057   {
00058     uint8_t     i_start_track;  
00059     uint8_t     i_start_index;  
00060     uint8_t     i_end_track;    
00061     uint8_t     i_end_index;    
00062   } cdio_track_index_t;
00063 
00074   driver_return_code_t cdio_audio_get_volume (CdIo_t *p_cdio,  /*out*/
00075                                               cdio_audio_volume_t *p_volume);
00076 
00080   uint32_t cdio_audio_get_msf_seconds(msf_t *p_msf);
00081 
00087   driver_return_code_t cdio_audio_pause (CdIo_t *p_cdio);
00088 
00096   driver_return_code_t cdio_audio_play_msf (CdIo_t *p_cdio, 
00097                                             /*in*/msf_t *p_start_msf,
00098                                             /*in*/ msf_t *p_end_msf);
00099 
00106   driver_return_code_t cdio_audio_play_track_index 
00107   ( CdIo_t *p_cdio,  cdio_track_index_t *p_track_index);
00108 
00115   driver_return_code_t cdio_audio_read_subchannel (CdIo_t *p_cdio, 
00116                                                    /*out*/ cdio_subchannel_t *p_subchannel);
00117 
00124   driver_return_code_t cdio_audio_resume (CdIo_t *p_cdio);
00125 
00133   driver_return_code_t cdio_audio_set_volume (CdIo_t *p_cdio, /*out*/
00134                                               cdio_audio_volume_t *p_volume);
00135 
00142   driver_return_code_t cdio_audio_stop (CdIo_t *p_cdio);
00143 
00144 #ifdef __cplusplus
00145 }
00146 #endif /* __cplusplus */
00147 
00148 #endif /* __CDIO_AUDIO_H__ */

Generated for libcdio by doxygen 1.7.6.1