File: audioprefetch.h

package info (click to toggle)
muse 0.8.1a-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 14,128 kB
  • ctags: 8,595
  • sloc: cpp: 68,637; sh: 8,640; ansic: 1,457; makefile: 854; python: 579
file content (38 lines) | stat: -rw-r--r-- 1,001 bytes parent folder | download | duplicates (3)
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
//=========================================================
//  MusE
//  Linux Music Editor
//  $Id: audioprefetch.h,v 1.3.2.1 2005/06/04 19:25:15 spamatica Exp $
//
//  (C) Copyright 2001 Werner Schweer (ws@seh.de)
//=========================================================

#ifndef __AUDIOPREFETCH_H__
#define __AUDIOPREFETCH_H__

#include "thread.h"

//---------------------------------------------------------
//   AudioPrefetch
//---------------------------------------------------------

class AudioPrefetch : public Thread {
      unsigned writePos;
      unsigned seekPos; // remember last seek to optimize seeks

      virtual void processMsg1(const void*);
      void prefetch();
      void seek(unsigned pos);

   public:
      AudioPrefetch(int prio, const char* name);
      ~AudioPrefetch();
      virtual void start();

      void msgTick();
      void msgSeek(unsigned samplePos, bool force=false);
      volatile bool seekDone;
      };

extern AudioPrefetch* audioPrefetch;

#endif