Audaspace 1.5.0
A high level audio library.
Loading...
Searching...
No Matches
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
26
28
33{
34private:
38 bool m_playing;
39
40 // delete copy constructor and operator=
41 ReadDevice(const ReadDevice&) = delete;
42 ReadDevice& operator=(const ReadDevice&) = delete;
43
44protected:
45 virtual void AUD_LOCAL playing(bool playing);
46
47public:
53
59
63 virtual ~ReadDevice();
64
73 bool read(data_t* buffer, int length);
74
79 void changeSpecs(Specs specs);
80};
81
#define AUD_NAMESPACE_END
Closes the audaspace namespace aud.
Definition Audaspace.h:119
#define AUD_LOCAL
Used for hiding symbols from export in the shared library.
Definition Audaspace.h:80
#define AUD_NAMESPACE_BEGIN
Opens the audaspace namespace aud.
Definition Audaspace.h:116
#define AUD_API
Used for exporting symbols in the shared library.
Definition Audaspace.h:93
unsigned char data_t
Sample data type (format samples)
Definition Audaspace.h:129
The SoftwareDevice class.
This device enables to let the user read raw data out of it.
Definition ReadDevice.h:33
ReadDevice(Specs specs)
Creates a new read device.
virtual void AUD_LOCAL playing(bool playing)
This function tells the device, to start or pause playback.
bool read(data_t *buffer, int length)
Reads the next bytes into the supplied buffer.
virtual ~ReadDevice()
Closes the device.
void changeSpecs(Specs specs)
Changes the output specification.
ReadDevice(DeviceSpecs specs)
Creates a new read device.
The software device is a generic device with software mixing.
Definition SoftwareDevice.h:52
Specification of a sound device.
Definition Specification.h:129
Specification of a sound source.
Definition Specification.h:119