Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

buffering.h
Friday, June 29th, 2007 at 4:10:53pm UTC 

  1. /***************************************************************************
  2.  *             __________               __   ___.
  3.  *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
  4.  *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
  5.  *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
  6.  *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
  7.  *                     \/            \/     \/    \/            \/
  8.  * $Id$
  9.  *
  10.  * Copyright (C) 2007 Nicolas Pennequin
  11.  *
  12.  * All files in this archive are subject to the GNU General Public License.
  13.  * See the file COPYING in the source tree root for full license agreement.
  14.  *
  15.  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  16.  * KIND, either express or implied.
  17.  *
  18.  ****************************************************************************/
  19.  
  20. #ifndef _BUFFERING_H_
  21. #define _BUFFERING_H_
  22.  
  23. #include <sys/types.h>
  24.  
  25. enum data_type {
  26.     TYPE_UNKNOWN,
  27.     TYPE_AUDIO,
  28.     TYPE_ID3,
  29.     TYPE_CUESHEET,
  30.     TYPE_IMAGE
  31. };
  32.  
  33. enum data_state {
  34.     STATE_UNKNOWN,
  35.     STATE_OUTDATED,
  36.     STATE_IN_USE,
  37.     STATE_TO_BE_USED
  38. };
  39.  
  40. struct memory_handle {
  41.     enum data_type type;
  42.     enum data_state state;
  43.     char path[MAX_PATH];
  44.     size_t filerem;            /* Remaining bytes of file NOT in buffer */
  45.     size_t filesize;           /* File total length */
  46.     volatile size_t available; /* Available bytes to read from buffer */
  47.     size_t start_pos;          /* Position to first bytes of file in buffer */
  48.     size_t buf_idx;            /* Pointer to the data buffer */
  49. };
  50.  
  51. void buffering_init(void);
  52. void audio_reset_buffer(void);
  53.  
  54. #endif

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



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.

comments powered by Disqus
worth-right worth-right