~ubuntu-branches/ubuntu/lucid/ecasound2.2/lucid

« back to all changes in this revision

Viewing changes to libecasound/audioio-db-buffer.h

  • Committer: Bazaar Package Importer
  • Author(s): Junichi Uekawa
  • Date: 2005-04-14 09:15:48 UTC
  • Revision ID: james.westby@ubuntu.com-20050414091548-o7kgb47z0tcunh0s
Tags: upstream-2.4.1
ImportĀ upstreamĀ versionĀ 2.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef INCLUDED_AUDIOIO_DB_BUFFER_H
 
2
#define INCLUDED_AUDIOIO_DB_BUFFER_H
 
3
 
 
4
#include <kvu_locks.h>
 
5
#include "audioio.h"
 
6
 
 
7
class SAMPLE_BUFFER;
 
8
 
 
9
/**
 
10
 * Buffer used between db server and client
 
11
 */
 
12
class AUDIO_IO_DB_BUFFER {
 
13
 
 
14
 public:
 
15
 
 
16
  ATOMIC_INTEGER readptr_rep;
 
17
  ATOMIC_INTEGER writeptr_rep;
 
18
  ATOMIC_INTEGER finished_rep;
 
19
  std::vector<SAMPLE_BUFFER*> sbufs_rep;
 
20
  AUDIO_IO::Io_mode io_mode_rep;
 
21
 
 
22
  void reset(void);
 
23
  int read_space(void);
 
24
  int write_space(void);
 
25
  void advance_read_pointer(void);
 
26
  void advance_write_pointer(void);
 
27
 
 
28
  AUDIO_IO_DB_BUFFER(int number_of_buffers,
 
29
                     long int buffersize,
 
30
                     int channels);
 
31
  ~AUDIO_IO_DB_BUFFER(void);
 
32
};
 
33
 
 
34
#endif