2003-02-07 09:41:57 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2002 by Linus Nielsen Feltzing
|
|
|
|
*
|
2008-06-28 18:10:04 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2003-02-07 09:41:57 +00:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef _MPEG_H_
|
|
|
|
#define _MPEG_H_
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
2008-10-15 06:38:51 +00:00
|
|
|
#include "metadata.h"
|
2003-02-07 09:41:57 +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. */
|
2008-04-27 19:56:16 +00:00
|
|
|
#define MPEG_LOW_WATER 0x60000
|
|
|
|
#define MPEG_RECORDING_LOW_WATER 0x80000
|
|
|
|
#define MPEG_LOW_WATER_CHUNKSIZE 0x40000
|
|
|
|
#define MPEG_LOW_WATER_SWAP_CHUNKSIZE 0x10000
|
2008-10-31 21:25:04 +00:00
|
|
|
#if (CONFIG_STORAGE & STORAGE_MMC)
|
2008-04-27 19:56:16 +00:00
|
|
|
#define MPEG_PLAY_PENDING_THRESHOLD 0x20000
|
|
|
|
#define MPEG_PLAY_PENDING_SWAPSIZE 0x20000
|
2004-11-07 08:11:01 +00:00
|
|
|
#else
|
2008-04-27 19:56:16 +00:00
|
|
|
#define MPEG_PLAY_PENDING_THRESHOLD 0x10000
|
|
|
|
#define MPEG_PLAY_PENDING_SWAPSIZE 0x10000
|
2004-11-07 08:11:01 +00:00
|
|
|
#endif
|
2003-02-07 09:41:57 +00:00
|
|
|
|
2003-12-31 03:13:29 +00:00
|
|
|
#define MPEG_MAX_PRERECORD_SECONDS 30
|
|
|
|
|
2003-04-20 22:00:30 +00:00
|
|
|
/* For ID3 info and VBR header */
|
2005-09-15 05:29:26 +00:00
|
|
|
#define MPEG_RESERVED_HEADER_SPACE (4096 + 576)
|
2003-04-20 22:00:30 +00:00
|
|
|
|
2005-08-29 21:15:27 +00:00
|
|
|
#if (CONFIG_CODEC == MAS3587F) || defined(SIMULATOR)
|
2005-11-12 04:00:56 +00:00
|
|
|
|
2005-05-28 01:09:19 +00:00
|
|
|
#if CONFIG_TUNER & S1A0903X01
|
|
|
|
int mpeg_get_mas_pllfreq(void);
|
|
|
|
#endif
|
2005-11-12 04:00:56 +00:00
|
|
|
|
2003-02-07 09:41:57 +00:00
|
|
|
#endif
|
2004-07-29 13:58:16 +00:00
|
|
|
unsigned long mpeg_get_last_header(void);
|
2003-02-07 09:41:57 +00:00
|
|
|
|
2004-01-10 15:39:56 +00:00
|
|
|
/* in order to keep the recording here, I have to expose this */
|
|
|
|
void rec_tick(void);
|
|
|
|
void playback_tick(void); /* FixMe: get rid of this, use mp3_get_playtime() */
|
|
|
|
|
2005-08-21 21:15:32 +00:00
|
|
|
void audio_set_track_changed_event(void (*handler)(struct mp3entry *id3));
|
2007-10-31 13:43:50 +00:00
|
|
|
void audio_set_track_buffer_event(void (*handler)(struct mp3entry *id3));
|
|
|
|
void audio_set_track_unbuffer_event(void (*handler)(struct mp3entry *id3));
|
2007-03-01 00:26:24 +00:00
|
|
|
void audio_set_cuesheet_callback(bool (*handler)(const char *filename));
|
2005-08-21 21:15:32 +00:00
|
|
|
|
2003-02-07 09:41:57 +00:00
|
|
|
#endif
|