~ubuntu-branches/ubuntu/quantal/muse/quantal

« back to all changes in this revision

Viewing changes to muse/driver/alsatimer.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2005-08-23 17:19:39 UTC
  • mto: (4.1.1 breezy) (1.1.9) (10.1.6 sid)
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20050823171939-hd8fgzokb4dbj007
Tags: upstream-0.7.1+0.7.2pre2
ImportĀ upstreamĀ versionĀ 0.7.1+0.7.2pre2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//=========================================================
 
2
//  MusE
 
3
//  Linux Music Editor
 
4
//  $Id: alsatimer.h,v 1.1.2.2 2005/01/20 21:44:32 spamatica Exp $
 
5
//
 
6
//  Plenty of code borrowed from timer.c example in 
 
7
//  alsalib 1.0.7
 
8
//
 
9
//  (C) Copyright 2004 Robert Jonsson (rj@spamatica.se)
 
10
//=========================================================
 
11
 
 
12
#ifndef __ALSATIMER_H__
 
13
#define __ALSATIMER_H__
 
14
 
 
15
#include "alsa/asoundlib.h"
 
16
#include "timerdev.h"
 
17
 
 
18
 
 
19
//---------------------------------------------------------
 
20
//   AlsaTimer
 
21
//---------------------------------------------------------
 
22
 
 
23
class AlsaTimer : public Timer{
 
24
    
 
25
    snd_timer_t *handle;
 
26
    snd_timer_id_t *id;
 
27
    snd_timer_info_t *info;
 
28
    snd_timer_params_t *params;
 
29
    struct pollfd *fds;
 
30
    char timername[64];
 
31
    int count;
 
32
    int ticks;
 
33
 
 
34
 
 
35
    public:
 
36
       AlsaTimer();
 
37
       virtual ~AlsaTimer();
 
38
       
 
39
       virtual int initTimer();
 
40
       virtual bool setTimerResolution(int resolution);
 
41
       virtual int  getTimerResoltution();
 
42
       virtual bool setTimerTicks(int tick);
 
43
       
 
44
       virtual bool startTimer();
 
45
       virtual bool stopTimer();
 
46
       virtual unsigned long getTimerTicks(bool printTicks=false);
 
47
       
 
48
};
 
49
 
 
50
#endif //__ALSATIMER_H__