2002-05-24 12:22:14 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2002 by Linus Nielsen Feltzing
|
|
|
|
*
|
|
|
|
* All files in this archive are subject to the GNU General Public License.
|
|
|
|
* See the file COPYING in the source tree root for full license agreement.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef _MPEG_H_
|
|
|
|
#define _MPEG_H_
|
|
|
|
|
2002-07-02 15:55:50 +00:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2002-10-15 07:23:18 +00:00
|
|
|
#define MPEG_SWAP_CHUNKSIZE 0x2000
|
|
|
|
#define MPEG_HIGH_WATER 2 /* We leave 2 bytes empty because otherwise we
|
|
|
|
wouldn't be able to see the difference between
|
|
|
|
an empty buffer and a full one. */
|
|
|
|
#define MPEG_LOW_WATER 0x40000
|
|
|
|
#define MPEG_LOW_WATER_CHUNKSIZE 0x40000
|
|
|
|
|
2002-10-14 14:13:13 +00:00
|
|
|
struct mpeg_debug
|
|
|
|
{
|
|
|
|
int mp3buflen;
|
|
|
|
int mp3buf_write;
|
|
|
|
int mp3buf_swapwrite;
|
|
|
|
int mp3buf_read;
|
|
|
|
|
|
|
|
int last_dma_chunk_size;
|
|
|
|
|
|
|
|
bool dma_on;
|
|
|
|
bool playing;
|
|
|
|
bool play_pending;
|
|
|
|
bool is_playing;
|
|
|
|
bool filling;
|
|
|
|
bool dma_underrun;
|
|
|
|
|
|
|
|
int unplayed_space;
|
|
|
|
int unswapped_space;
|
2002-10-15 07:23:18 +00:00
|
|
|
|
|
|
|
int lowest_watermark_level;
|
2002-10-14 14:13:13 +00:00
|
|
|
};
|
|
|
|
|
2002-09-24 07:49:16 +00:00
|
|
|
void mpeg_init(int volume, int bass, int treble, int balance,
|
|
|
|
int loudness, int bass_boost, int avc);
|
2002-08-16 14:41:47 +00:00
|
|
|
void mpeg_play(int offset);
|
2002-05-24 12:22:14 +00:00
|
|
|
void mpeg_stop(void);
|
|
|
|
void mpeg_pause(void);
|
|
|
|
void mpeg_resume(void);
|
2002-06-26 21:27:17 +00:00
|
|
|
void mpeg_next(void);
|
|
|
|
void mpeg_prev(void);
|
2002-08-14 19:23:34 +00:00
|
|
|
void mpeg_ff_rewind(int change);
|
2002-09-10 08:50:40 +00:00
|
|
|
void mpeg_flush_and_reload_tracks(void);
|
2002-06-28 11:48:53 +00:00
|
|
|
void mpeg_sound_set(int setting, int value);
|
|
|
|
int mpeg_sound_min(int setting);
|
|
|
|
int mpeg_sound_max(int setting);
|
2002-06-28 11:54:47 +00:00
|
|
|
int mpeg_sound_default(int setting);
|
2002-09-09 15:13:33 +00:00
|
|
|
void mpeg_sound_channel_config(int configuration);
|
2002-06-28 11:48:53 +00:00
|
|
|
int mpeg_val2phys(int setting, int value);
|
2002-10-02 16:33:26 +00:00
|
|
|
int mpeg_phys2val(int setting, int value);
|
2002-06-28 11:48:53 +00:00
|
|
|
char *mpeg_sound_unit(int setting);
|
2002-06-28 12:39:47 +00:00
|
|
|
int mpeg_sound_numdecimals(int setting);
|
2002-06-25 13:26:04 +00:00
|
|
|
struct mp3entry* mpeg_current_track(void);
|
2002-07-25 23:12:41 +00:00
|
|
|
bool mpeg_has_changed_track(void);
|
2002-09-24 07:49:16 +00:00
|
|
|
int mpeg_status(void);
|
2002-09-12 12:25:44 +00:00
|
|
|
void mpeg_set_pitch(int percent);
|
2002-10-14 14:13:13 +00:00
|
|
|
void mpeg_get_debugdata(struct mpeg_debug *dbgdata);
|
2002-05-24 12:22:14 +00:00
|
|
|
|
2002-06-28 11:48:53 +00:00
|
|
|
#define SOUND_VOLUME 0
|
|
|
|
#define SOUND_BASS 1
|
|
|
|
#define SOUND_TREBLE 2
|
|
|
|
#define SOUND_BALANCE 3
|
|
|
|
#define SOUND_LOUDNESS 4
|
|
|
|
#define SOUND_SUPERBASS 5
|
2002-07-25 15:55:22 +00:00
|
|
|
#define SOUND_AVC 6
|
2002-09-09 15:13:33 +00:00
|
|
|
#define SOUND_CHANNELS 7
|
|
|
|
#define SOUND_NUMSETTINGS 8
|
|
|
|
|
|
|
|
#define MPEG_SOUND_STEREO 0
|
|
|
|
#define MPEG_SOUND_MONO 1
|
|
|
|
#define MPEG_SOUND_MONO_LEFT 2
|
|
|
|
#define MPEG_SOUND_MONO_RIGHT 3
|
2002-06-28 11:48:53 +00:00
|
|
|
|
2002-09-24 07:49:16 +00:00
|
|
|
#define MPEG_STATUS_PLAY 1
|
|
|
|
#define MPEG_STATUS_PAUSE 2
|
|
|
|
#define MPEG_STATUS_RECORD 4
|
|
|
|
|
2002-05-24 12:22:14 +00:00
|
|
|
#endif
|