summaryrefslogtreecommitdiff
path: root/libs/audiographer/audiographer/sndfile_base.h
blob: 7f8da752e806d0e0cfc21e465282c427c9fe959a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef AUDIOGRAPHER_SNDFILE_BASE_H
#define AUDIOGRAPHER_SNDFILE_BASE_H

#include <string>
#include <sndfile.h>
#include <sigc++/signal.h>

#include "types.h"
#include "debuggable.h"

namespace AudioGrapher {

/// Common interface for templated libsndfile readers/writers
class SndfileBase : public Debuggable<>
{
  public:
	
	sigc::signal<void, std::string> FileWritten;

  protected:
	SndfileBase (ChannelCount channels, nframes_t samplerate, int format, std::string const & path);
	virtual ~SndfileBase ();

	std::string    path;
	SF_INFO        sf_info;
	SNDFILE *      sndfile;
};

} // namespace

#endif // AUDIOGRAPHER_SNDFILE_BASE_H