kwave  18.07.70
MultiPlaybackSink.h
Go to the documentation of this file.
1 /***************************************************************************
2  MultiPlaybackSink.h - multi-track Kwave playback sink
3  -------------------
4  begin : Sun Nov 04 2007
5  copyright : (C) 2007 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef MULTI_PLAYBACK_SINK_H
19 #define MULTI_PLAYBACK_SINK_H
20 
21 #include "config.h"
22 
23 #include <QtGlobal>
24 #include <QBitArray>
25 #include <QMutex>
26 #include <QVector>
27 
30 #include "libkwave/PlaybackSink.h"
31 #include "libkwave/SampleArray.h"
32 
33 namespace Kwave
34 {
35 
36  class Q_DECL_EXPORT MultiPlaybackSink
37  :public Kwave::MultiTrackSink<Kwave::PlaybackSink, false>
38  {
39  Q_OBJECT
40  public:
46  MultiPlaybackSink(unsigned int tracks, Kwave::PlayBackDevice *device);
47 
49  virtual ~MultiPlaybackSink();
50 
51  private slots:
52 
58  void input(unsigned int track, Kwave::SampleArray data);
59 
60  private:
61 
63  unsigned int m_tracks;
64 
67 
69  QVector< Kwave::SampleArray > m_in_buffer;
70 
72  QBitArray m_in_buffer_filled;
73 
76 
78  QMutex m_lock;
79 
80  };
81 }
82 
83 #endif /* MULTI_PLAYBACK_SINK_H */
84 
85 //***************************************************************************
86 //***************************************************************************
Definition: App.h:33
Kwave::SampleArray m_out_buffer
QVector< Kwave::SampleArray > m_in_buffer
Kwave::PlayBackDevice * m_device