Advertising
- buffering.h
- Friday, June 29th, 2007 at 10:10:53am MDT
- /***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2007 Nicolas Pennequin
- *
- * 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 _BUFFERING_H_
- #define _BUFFERING_H_
- #include <sys/types.h>
- enum data_type {
- TYPE_UNKNOWN,
- TYPE_AUDIO,
- TYPE_ID3,
- TYPE_CUESHEET,
- TYPE_IMAGE
- };
- enum data_state {
- STATE_UNKNOWN,
- STATE_OUTDATED,
- STATE_IN_USE,
- STATE_TO_BE_USED
- };
- struct memory_handle {
- enum data_type type;
- enum data_state state;
- char path[MAX_PATH];
- size_t filerem; /* Remaining bytes of file NOT in buffer */
- size_t filesize; /* File total length */
- volatile size_t available; /* Available bytes to read from buffer */
- size_t start_pos; /* Position to first bytes of file in buffer */
- size_t buf_idx; /* Pointer to the data buffer */
- };
- void buffering_init(void);
- void audio_reset_buffer(void);
- #endif
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.