Audaspace
1.9.0
A high level audio library.
Toggle main menu visibility
Loading...
Searching...
No Matches
devices
ReadDevice.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright 2009-2016 Jörg Müller
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
******************************************************************************/
16
17
#pragma once
18
24
25
#include "
devices/SoftwareDevice.h
"
26
27
AUD_NAMESPACE_BEGIN
28
32
class
AUD_API
ReadDevice :
public
SoftwareDevice
33
{
34
private
:
38
bool
m_playing;
39
40
// delete copy constructor and operator=
41
ReadDevice(
const
ReadDevice&) =
delete
;
42
ReadDevice& operator=(
const
ReadDevice&) =
delete
;
43
44
protected
:
45
virtual
void
AUD_LOCAL
playing
(
bool
playing
);
46
47
public
:
52
ReadDevice
(
DeviceSpecs
specs);
53
58
ReadDevice
(
Specs
specs);
59
63
virtual
~ReadDevice
();
64
73
bool
read
(
data_t
* buffer,
int
length);
74
79
void
changeSpecs
(
Specs
specs);
80
};
81
82
AUD_NAMESPACE_END
AUD_NAMESPACE_END
#define AUD_NAMESPACE_END
Closes the audaspace namespace aud.
Definition
Audaspace.h:119
AUD_LOCAL
#define AUD_LOCAL
Used for hiding symbols from export in the shared library.
Definition
Audaspace.h:80
AUD_NAMESPACE_BEGIN
#define AUD_NAMESPACE_BEGIN
Opens the audaspace namespace aud.
Definition
Audaspace.h:116
AUD_API
#define AUD_API
Used for exporting symbols in the shared library.
Definition
Audaspace.h:93
data_t
unsigned char data_t
Sample data type (format samples).
Definition
Audaspace.h:129
SoftwareDevice.h
The SoftwareDevice class.
ReadDevice::ReadDevice
ReadDevice(Specs specs)
Creates a new read device.
ReadDevice::playing
virtual void AUD_LOCAL playing(bool playing)
This function tells the device, to start or pause playback.
ReadDevice::read
bool read(data_t *buffer, int length)
Reads the next bytes into the supplied buffer.
ReadDevice::~ReadDevice
virtual ~ReadDevice()
Closes the device.
ReadDevice::changeSpecs
void changeSpecs(Specs specs)
Changes the output specification.
ReadDevice::ReadDevice
ReadDevice(DeviceSpecs specs)
Creates a new read device.
SoftwareDevice::SoftwareDevice
SoftwareDevice()
Empty default constructor.
DeviceSpecs
Specification of a sound device.
Definition
Specification.h:129
Specs
Specification of a sound source.
Definition
Specification.h:119
Generated by
1.17.0