Changeset 190 for fm_server/trunk/src/fm_buffer.h
- Timestamp:
- 01/16/08 13:28:21 (4 years ago)
- Files:
-
- 1 modified
-
fm_server/trunk/src/fm_buffer.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fm_server/trunk/src/fm_buffer.h
r186 r190 1 1 /* 2 2 * FreeMix - sound server 3 * Copyright (C) 2004 Alberto Botti <ath9@libero.it>3 * Copyright (C) 2004-2008 Alberto Botti <alberto.botti@yoda2000.net> 4 4 * 5 5 * This program is free software; you can redistribute it and/or modify … … 19 19 * 20 20 * fm_buffer.h - object used to store and pass around audio data 21 *22 21 */ 23 22 24 23 25 24 typedef struct _FmBuffer FmBuffer; 26 27 //#define MAX_SAMPLES 1024 // ?28 25 29 26 … … 43 40 gfloat *data; 44 41 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 45 44 46 45 guint n_channels; … … 48 47 guint allocated_samples; 49 48 guint used_samples; 49 50 50 guint requested_samples; 51 51 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 53 54 }; 54 55 … … 75 76 guint n_samples); 76 77 78 void 79 fm_buffer_reset_flags (FmBuffer *buffer); 80 81 77 82 #define FM_BUFFER_DATA(x) (x)->data 78 83 #define FM_BUFFER_CHANNEL_DATA(x,y) (x)->channel_data[(y)] 84 #define FM_BUFFER_DISCONT(x) (x)->discont 79 85 80 86 #define FM_BUFFER_ALLOCATED_SAMPLES(x) (x)->allocated_samples … … 86 92 87 93 #define FM_BUFFER_TIMESTAMP(x) (x)->timestamp 94 #define FM_BUFFER_DURATION(x) (x)->duration
