File: PsychPortAudio.h

package info (click to toggle)
psychtoolbox-3 3.0.19.14.dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 86,796 kB
  • sloc: ansic: 176,245; cpp: 20,103; objc: 5,393; sh: 2,753; python: 1,397; php: 384; makefile: 193; java: 113
file content (95 lines) | stat: -rw-r--r-- 3,112 bytes parent folder | download | duplicates (4)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
        PsychToolbox3/Source/Common/PsychPortAudio/PsychPortAudio.h

        PLATFORMS:    All

        AUTHORS:

        Mario Kleiner   mk      mario.kleiner.de@gmail.com

        HISTORY:

        21.03.07        mk      wrote it.

        NOTES:

        This needs the portaudio.h header file, which should be located in /usr/include/portaudio.h
        after a standard ./configure; make; make install installation on Linux & OS/X.
*/

//begin include once
#ifndef PSYCH_IS_INCLUDED_PsychPortAudio
#define PSYCH_IS_INCLUDED_PsychPortAudio

//project includes
#include "Psych.h"
#include "PsychTimeGlue.h"
#include "portaudio.h"

// Internal helper functions:

// Module exit function: Stop and close all audio streams, terminate PortAudio...
PsychError PsychPortAudioExit(void);

// Init function: Can be called anytime to make sure that PortAudio is online...
void PsychPortAudioInitialize(void);

// Show command overview:
PsychError PSYCHPORTAUDIODisplaySynopsis(void);
const char** InitializeSynopsis(void);

//function prototypes:

// Version:
PsychError MODULEVersion(void);
// Level of verbosity:
PsychError PSYCHPORTAUDIOVerbosity(void);

// Open audio device:
PsychError PSYCHPORTAUDIOOpen(void);
// Open virtual audio slave device:
PsychError PSYCHPORTAUDIOOpenSlave(void);
// Close audio device, shutdown PortAudio if last device is closed:
PsychError PSYCHPORTAUDIOClose(void);
// Fill audio output buffer with data:
PsychError PSYCHPORTAUDIOFillAudioBuffer(void);
// Refill audio output buffer with data:
PsychError PSYCHPORTAUDIORefillBuffer(void);
// Start or schedule start of device:
PsychError PSYCHPORTAUDIOStartAudioDevice(void);
// Reschedule start of audio device:
PsychError PSYCHPORTAUDIORescheduleStart(void);
// Stop device immediately:
PsychError PSYCHPORTAUDIOStopAudioDevice(void);
// Enumerate audio devices:
PsychError PSYCHPORTAUDIOGetDevices(void);
// Return status of device:
PsychError PSYCHPORTAUDIOGetStatus(void);
// Set a manual bias for the latencies we operate on.
PsychError PSYCHPORTAUDIOLatencyBias(void);
// Retrieve buffer with captured audio data:
PsychError PSYCHPORTAUDIOGetAudioData(void);
// Select general run mode for audio device:
PsychError PSYCHPORTAUDIORunMode(void);
// Select sample loop for audio device:
PsychError PSYCHPORTAUDIOSetLoop(void);
// Set tuneable low-level engine parameters:
PsychError PSYCHPORTAUDIOEngineTunables(void);
// Get count of open audio devices:
PsychError PSYCHPORTAUDIOGetOpenDeviceCount(void);
// Alloc/Dealloc Enable/Disable playback schedules:
PsychError PSYCHPORTAUDIOUseSchedule(void);
// Add sot to playback schedule:
PsychError PSYCHPORTAUDIOAddToSchedule(void);
// Create and fill dynamic audio buffer:
PsychError PSYCHPORTAUDIOCreateBuffer(void);
// Delete dynamic audio buffer:
PsychError PSYCHPORTAUDIODeleteBuffer(void);
// Change device opMode at runtime:
PsychError PSYCHPORTAUDIOSetOpMode(void);
// Enable/Disable or reconfigure direct input monitoring:
PsychError PSYCHPORTAUDIODirectInputMonitoring(void);
// Set per-device volume:
PsychError PSYCHPORTAUDIOVolume(void);
//end include once
#endif