summaryrefslogtreecommitdiff
path: root/src/device_alsa.h
blob: a4e328927445354b9b11f968025315bf24571e75 (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
32
33
34
35
36
37
38
#ifndef DEVICE_ALSA_H
#define DEVICE_ALSA_H


#include "audiere.h"
#include "device_mixer.h"

#include <alsa/asoundlib.h>

namespace audiere {

  class ALSAAudioDevice : public MixerDevice {
  public:
    static ALSAAudioDevice* create(const ParameterList& parameters);

  private:
    ALSAAudioDevice(snd_pcm_t* pcm_handle,
		    const std::string &name,
		    unsigned int rate,
		    unsigned int buffer_size);
    ~ALSAAudioDevice();

  public:
    void ADR_CALL update();
    const char* ADR_CALL getName();

  private:
    snd_pcm_t* m_pcm_handle;
    unsigned int m_buffer_size;
    char* m_buffer;
    std::string m_pcm_name;
    unsigned int m_rate;
  };

}


#endif