Show
Ignore:
Timestamp:
01/16/08 13:28:21 (4 years ago)
Author:
ath
Message:

Add new buffer flags.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • fm_server/trunk/src/fm_buffer.h

    r186 r190  
    11/* 
    22 *  FreeMix - sound server 
    3  *  Copyright (C) 2004 Alberto Botti <ath9@libero.it> 
     3 *  Copyright (C) 2004-2008 Alberto Botti <alberto.botti@yoda2000.net> 
    44 * 
    55 *  This program is free software; you can redistribute it and/or modify 
     
    1919 * 
    2020 *  fm_buffer.h - object used to store and pass around audio data 
    21  * 
    2221 */ 
    2322 
    2423 
    2524typedef struct _FmBuffer FmBuffer; 
    26  
    27 //#define MAX_SAMPLES 1024              // ? 
    2825 
    2926 
     
    4340        gfloat          *data; 
    4441        gfloat *        channel_data[FM_CHANNELS_LAST]; 
     42        gboolean        discont;                // the buffer is a start of a discontinuous section 
     43        gboolean        silence;                // the whole buffer contains silence 
    4544         
    4645        guint           n_channels; 
     
    4847        guint           allocated_samples; 
    4948        guint           used_samples; 
     49 
    5050        guint           requested_samples; 
    5151 
    52         guint64         timestamp; 
     52        guint64         timestamp;              // real timestamp from start of the song 
     53        guint64         duration;               // real duration of AUDIO (not silence) in the buffer  
    5354}; 
    5455 
     
    7576                                         guint          n_samples); 
    7677 
     78void 
     79fm_buffer_reset_flags                   (FmBuffer       *buffer); 
     80 
     81 
    7782#define FM_BUFFER_DATA(x) (x)->data 
    7883#define FM_BUFFER_CHANNEL_DATA(x,y) (x)->channel_data[(y)] 
     84#define FM_BUFFER_DISCONT(x) (x)->discont 
    7985 
    8086#define FM_BUFFER_ALLOCATED_SAMPLES(x) (x)->allocated_samples 
     
    8692 
    8793#define FM_BUFFER_TIMESTAMP(x) (x)->timestamp 
     94#define FM_BUFFER_DURATION(x) (x)->duration