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
6c67ba62
Commit
6c67ba62
authored
Jul 13, 2020
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor website changes in preparation for documentation.
parent
07bc119a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
2 deletions
+76
-2
website/.webplate/miniaudio-header.html
website/.webplate/miniaudio-header.html
+1
-1
website/docs/examples/simple_playback.html
website/docs/examples/simple_playback.html
+70
-0
website/docs/index.html
website/docs/index.html
+5
-1
No files found.
website/.webplate/miniaudio-header.html
View file @
6c67ba62
...
@@ -39,4 +39,4 @@
...
@@ -39,4 +39,4 @@
</table>
</table>
</div>
</div>
</div>
</div>
<div
style=
"background-color:#fff; padding-bottom:1em; border-top:solid 1px #003800; background-color:#eee;"
>
<div
style=
"background-color:#fff; padding-bottom:0em; border-top:solid 1px #003800; background-color:#eee;"
>
\ No newline at end of file
\ No newline at end of file
website/docs/examples/simple_playback.html
View file @
6c67ba62
{{ miniaudio-header }}
<table
border=
"0"
style=
"margin:0 auto; width:100%; border-collapse:collapse; border:solid 0px #000;"
><tr>
<td
valign=
"top"
style=
"width:20em; padding:0; margin:0; border-right:solid 0px #000;"
><div
style=
"position:relative; height:100%; width:300px; border:solid 0px #000; padding:0; margin:0;"
>
<a
href=
"{{ relative-path "
docs
/
index
.
html
"
}}"
class=
"doc-navigation"
>
Documentation Home
</a><a
href=
"{{ relative-path "
docs
/
guide
/
index
.
html
"
}}"
class=
"doc-navigation"
>
Programming Guide
</a><a
href=
"{{ relative-path "
./
docs
/
examples
/
index
.
html
"
}}"
class=
"doc-navigation "
>
Examples
</a><a
href=
"{{ relative-path "
docs
/
examples
/
fixed_size_callback
.
html
"
}}"
class=
"doc-navigation doc-navigation-l1 "
>
Fixed Size Callback
</a><a
href=
"{{ relative-path "
docs
/
examples
/
simple_capture
.
html
"
}}"
class=
"doc-navigation doc-navigation-l1 "
>
Simple Capture
</a><a
href=
"{{ relative-path "
docs
/
examples
/
simple_duplex
.
html
"
}}"
class=
"doc-navigation doc-navigation-l1 "
>
Simple Duplex
</a><a
href=
"{{ relative-path "
docs
/
examples
/
simple_enumeration
.
html
"
}}"
class=
"doc-navigation doc-navigation-l1 "
>
Simple Enumeration
</a><a
href=
"{{ relative-path "
docs
/
examples
/
simple_loopback
.
html
"
}}"
class=
"doc-navigation doc-navigation-l1 "
>
Simple Loopback
</a><a
href=
"{{ relative-path "
docs
/
examples
/
simple_looping
.
html
"
}}"
class=
"doc-navigation doc-navigation-l1 "
>
Simple Looping
</a><a
href=
"{{ relative-path "
docs
/
examples
/
simple_mixing
.
html
"
}}"
class=
"doc-navigation doc-navigation-l1 "
>
Simple Mixing
</a><a
href=
"{{ relative-path "
docs
/
examples
/
simple_playback
.
html
"
}}"
class=
"doc-navigation doc-navigation-l1 doc-navigation-active"
>
Simple Playback
</a><a
href=
"{{ relative-path "
docs
/
examples
/
simple_playback_sine
.
html
"
}}"
class=
"doc-navigation doc-navigation-l1 "
>
Simple Playback Sine
</a><a
href=
"{{ relative-path "
docs
/
api
/
index
.
html
"
}}"
class=
"doc-navigation"
style=
"border-bottom:none;"
>
API Reference
</a></div></td><td
valign=
"top"
style=
"padding:1em; border-left:solid 1px #bbb;"
>
<div
style=
"font-family:monospace; border:solid 1px #003800; border-left:solid 0.5em #003800; margin:1em 0em;"
><pre
style=
"margin:0.5em 1em; padding:0; line-height:125%"
>
#define MINIAUDIO_IMPLEMENTATION
#include
"
../miniaudio.h
"
#include
<
stdio.h
>
void data_callback(ma_device* pDevice, void* pOutput, const void* pInput, ma_uint32 frameCount)
{
ma_decoder* pDecoder = (ma_decoder*)pDevice-
>
pUserData;
if (pDecoder == NULL) {
return;
}
ma_decoder_read_pcm_frames(pDecoder, pOutput, frameCount);
(void)pInput;
}
int main(int argc, char** argv)
{
ma_result result;
ma_decoder decoder;
ma_device_config deviceConfig;
ma_device device;
if (argc
<
2) {
printf(
"
No input file.\n
"
);
return -1;
}
result = ma_decoder_init_file(argv[1], NULL,
&
decoder);
if (result != MA_SUCCESS) {
return -2;
}
deviceConfig = ma_device_config_init(ma_device_type_playback);
deviceConfig.playback.format = decoder.outputFormat;
deviceConfig.playback.channels = decoder.outputChannels;
deviceConfig.sampleRate = decoder.outputSampleRate;
deviceConfig.dataCallback = data_callback;
deviceConfig.pUserData =
&
decoder;
if (ma_device_init(NULL,
&
deviceConfig,
&
device) != MA_SUCCESS) {
printf(
"
Failed to open playback device.\n
"
);
ma_decoder_uninit(
&
decoder);
return -3;
}
if (ma_device_start(
&
device) != MA_SUCCESS) {
printf(
"
Failed to start playback device.\n
"
);
ma_device_uninit(
&
device);
ma_decoder_uninit(
&
decoder);
return -4;
}
printf(
"
Press Enter to quit...
"
);
getchar();
ma_device_uninit(
&
device);
ma_decoder_uninit(
&
decoder);
return 0;
}
</pre></div></td>
</tr></table>
{{ miniaudio-footer }}
\ No newline at end of file
website/docs/index.html
View file @
6c67ba62
{{ miniaudio-header }}
{{ miniaudio-header }}
<table
border=
"0"
style=
"margin:0 auto; width:100%; border-collapse:collapse; border:solid 0px #000;"
><tr>
<td
valign=
"top"
style=
"width:20em; padding:0; margin:0; border-right:solid 0px #000;"
><div
style=
"position:relative; height:100%; width:300px; border:solid 0px #000; padding:0; margin:0;"
>
<a
href=
"{{ relative-path "
docs
/
index
.
html
"
}}"
class=
"doc-navigation doc-navigation-active"
>
Documentation Home
</a><a
href=
"{{ relative-path "
docs
/
guide
/
index
.
html
"
}}"
class=
"doc-navigation"
>
Programming Guide
</a><a
href=
"{{ relative-path "
docs
/
examples
/
index
.
html
"
}}"
class=
"doc-navigation"
>
Examples
</a><a
href=
"{{ relative-path "
docs
/
api
/
index
.
html
"
}}"
class=
"doc-navigation"
style=
"border-bottom:none;"
>
API Reference
</a></div></td><td
valign=
"top"
style=
"padding:1em; border-left:solid 1px #bbb;"
>
<div
style=
"text-align:center; padding:1em;"
><div
style=
"text-align:center;"
><img
src=
"{{ relative-path "
img
/
logo1_large
.
png
"
}}"
style=
"width:auto; height:auto; min-height:70px;"
></div><div
style=
"padding-top:1em; font-weight:bold; font-size:2em; color:#444;"
>
Documentation
</div><div
style=
"padding-top:0.75em; text-align:center;"
><a
href=
"{{ relative-path "
docs
/
guide
/
index
.
html
"
}}"
>
Programming Guide
</a>
-
<a
href=
"{{ relative-path "
docs
/
examples
/
index
.
html
"
}}"
>
Examples
</a>
-
<a
href=
"{{ relative-path "
docs
/
api
/
index
.
html
"
}}"
>
API Reference
</a>
-
<a
href=
"https://github.com/dr-soft/miniaudio"
>
Source Code
</a></div></div></td>
</tr></table>
{{ miniaudio-footer }}
{{ miniaudio-footer }}
\ No newline at end of file
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