LMMS
Loading...
Searching...
No Matches
Audio_Scope.h
Go to the documentation of this file.
1// Simple audio waveform scope in a window, using SDL multimedia library
2
3#ifndef AUDIO_SCOPE_H
4#define AUDIO_SCOPE_H
5
6#include "SDL.h"
7
9public:
10 typedef const char* error_t;
11
12 // Initialize scope window of specified size. Height must be 256 or less.
13 error_t init( int width, int height );
14
15 // Draw at most 'count' samples from 'in', skipping 'step' samples after
16 // each sample drawn. Step can be less than 1.0.
17 error_t draw( const short* in, long count, double step = 1.0 );
18
21
22private:
23 typedef unsigned char byte;
24 SDL_Surface* screen;
25 SDL_Surface* surface;
26 byte* buf;
29 int low_y;
30 int high_y;
32
33 void render( short const* in, long count, long step );
34};
35
36#endif
SDL_Surface * screen
Definition Audio_Scope.h:24
int sample_shift
Definition Audio_Scope.h:28
int buf_size
Definition Audio_Scope.h:27
~Audio_Scope()
Definition Audio_Scope.cpp:34
int high_y
Definition Audio_Scope.h:30
void render(short const *in, long count, long step)
Definition Audio_Scope.cpp:113
Audio_Scope()
Definition Audio_Scope.cpp:28
int v_offset
Definition Audio_Scope.h:31
byte * buf
Definition Audio_Scope.h:26
error_t draw(const short *in, long count, double step=1.0)
Definition Audio_Scope.cpp:75
const char * error_t
Definition Audio_Scope.h:10
int low_y
Definition Audio_Scope.h:29
SDL_Surface * surface
Definition Audio_Scope.h:25
unsigned char byte
Definition Audio_Scope.h:23
static int int height
Definition pugl.h:1594
static int width
Definition pugl.h:1593
float in
Definition lilv_test.c:1460
ZCONST uch * init
Definition extract.c:2392
_WDL_CSTRING_PREFIX void INT_PTR count
Definition wdlcstring.h:263