Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
miniaudio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
miniaudio
Commits
d177cb5e
Commit
d177cb5e
authored
Aug 14, 2021
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update readme.
parent
73fdf848
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
25 deletions
+55
-25
README.md
README.md
+52
-23
examples/engine_hello_world.c
examples/engine_hello_world.c
+3
-2
No files found.
README.md
View file @
d177cb5e
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</p>
</p>
<p
align=
"center"
>
<p
align=
"center"
>
<a
href=
"#example
"
>
Example
</a>
-
<a
href=
"#example
s"
>
Examples
</a>
-
<a
href=
"#documentation"
>
Documentation
</a>
-
<a
href=
"#documentation"
>
Documentation
</a>
-
<a
href=
"#supported-platforms"
>
Supported Platforms
</a>
-
<a
href=
"#supported-platforms"
>
Supported Platforms
</a>
-
<a
href=
"#backends"
>
Backends
</a>
-
<a
href=
"#backends"
>
Backends
</a>
-
...
@@ -20,8 +20,8 @@
...
@@ -20,8 +20,8 @@
<a
href=
"#unofficial-bindings"
>
Unofficial Bindings
</a>
<a
href=
"#unofficial-bindings"
>
Unofficial Bindings
</a>
</p>
</p>
Example
Example
s
=======
=======
=
This example shows how to decode and play a sound.
This example shows how to decode and play a sound.
```
c
```
c
...
@@ -88,6 +88,42 @@ int main(int argc, char** argv)
...
@@ -88,6 +88,42 @@ int main(int argc, char** argv)
return
0
;
return
0
;
}
}
```
```
This example shows how to play a sound using the high level API
```
c
#define MINIAUDIO_IMPLEMENTATION
#include "../miniaudio.h"
#include <stdio.h>
int
main
(
int
argc
,
char
**
argv
)
{
ma_result
result
;
ma_engine
engine
;
if
(
argc
<
2
)
{
printf
(
"No input file."
);
return
-
1
;
}
result
=
ma_engine_init
(
NULL
,
&
engine
);
if
(
result
!=
MA_SUCCESS
)
{
printf
(
"Failed to initialize audio engine."
);
return
-
1
;
}
ma_engine_play_sound
(
&
engine
,
argv
[
1
],
NULL
);
printf
(
"Press Enter to quit..."
);
getchar
();
ma_engine_uninit
(
&
engine
);
return
0
;
}
```
More examples can be found in the
[
examples
](
examples
)
folder or online here: https://miniaud.io/docs/examples/
More examples can be found in the
[
examples
](
examples
)
folder or online here: https://miniaud.io/docs/examples/
...
@@ -127,6 +163,7 @@ Backends
...
@@ -127,6 +163,7 @@ Backends
-
OpenSL|ES (Android only)
-
OpenSL|ES (Android only)
-
Web Audio (Emscripten)
-
Web Audio (Emscripten)
-
Null (Silence)
-
Null (Silence)
-
Custom
Major Features
Major Features
...
@@ -136,45 +173,37 @@ Major Features
...
@@ -136,45 +173,37 @@ Major Features
-
No external dependencies except for the C standard library and backend libraries.
-
No external dependencies except for the C standard library and backend libraries.
-
Written in C and compilable as C++, enabling miniaudio to work on almost all compilers.
-
Written in C and compilable as C++, enabling miniaudio to work on almost all compilers.
-
Supports all major desktop and mobile platforms, with multiple backends for maximum compatibility.
-
Supports all major desktop and mobile platforms, with multiple backends for maximum compatibility.
-
Supports custom backends.
-
A low level API with direct access to the raw audio data.
-
A high level API with resource management, node graphs and effects, including 3D spatialization.
-
Custom backends.
-
Supports playback, capture, full-duplex and loopback (WASAPI only).
-
Supports playback, capture, full-duplex and loopback (WASAPI only).
-
Device enumeration for connecting to specific devices, not just defaults.
-
Device enumeration for connecting to specific devices, not just defaults.
-
Connect to multiple devices at once.
-
Connect to multiple devices at once.
-
Shared and exclusive mode on supported backends.
-
Shared and exclusive mode on supported backends.
-
Backend-specific configuration options.
-
Data conversion (sample format, channel conversion and resampling).
-
Device capability querying.
-
Automatic data conversion between your application and the internal device.
-
Sample format conversion with optional dithering.
-
Channel conversion and channel mapping.
-
Resampling with support for multiple algorithms.
-
Simple linear resampling with anti-aliasing.
-
Optional Speex resampling (must opt-in).
-
Filters.
-
Filters.
-
Biquad
-
Biquad
s
-
Low-pass (first, second and high order)
-
Low-pass (first, second and high order)
-
High-pass (first, second and high order)
-
High-pass (first, second and high order)
-
Second order band-pass
-
Band-pass (second and high order)
-
Second order notch
-
Effects.
-
Second order peaking
-
Delay/Echo
-
S
econd order low shelf
-
S
patializer
-
S
econd order high shelf
-
S
tereo Pan
-
Waveform generation.
-
Waveform generation.
-
Sine
-
Sine
-
Square
-
Square
-
Triangle
-
Triangle
-
Sawtooth
-
Sawtooth
-
Noise generation.
-
Noise generation (white, pink, Brownian).
-
White
-
Pink
-
Brownian
-
Decoding
-
Decoding
-
WAV
-
WAV
-
FLAC
-
FLAC
-
MP3
-
MP3
-
Vorbis via stb_vorbis (not built in - must be included separately).
-
Vorbis via stb_vorbis (not built in - must be included separately).
-
Custom decoding backends are also supported.
-
Encoding
-
Encoding
-
WAV
-
WAV
-
Lock free ring buffer (single producer, single consumer).
Refer to the
[
Programming Manual
](
https://miniaud.io/docs/manual/
)
for a more complete description of
Refer to the
[
Programming Manual
](
https://miniaud.io/docs/manual/
)
for a more complete description of
available features in miniaudio.
available features in miniaudio.
...
...
examples/engine_hello_world.c
View file @
d177cb5e
...
@@ -4,8 +4,9 @@ This example demonstrates how to initialize an audio engine and play a sound.
...
@@ -4,8 +4,9 @@ This example demonstrates how to initialize an audio engine and play a sound.
This will play the sound specified on the command line.
This will play the sound specified on the command line.
*/
*/
#define MINIAUDIO_IMPLEMENTATION
#define MINIAUDIO_IMPLEMENTATION
#include "../../miniaudio.h"
#include "../miniaudio.h"
#include "../miniaudio_engine.h"
#include <stdio.h>
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment