Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PoroCYon
4klang-linux
Commits
1863ea1a
Commit
1863ea1a
authored
May 07, 2019
by
PoroCYon
Browse files
note on buffer size
parent
57c2bf06
Changes
1
Show whitespace changes
Inline
Side-by-side
v2/src/lplayer.cpp
View file @
1863ea1a
...
...
@@ -21,9 +21,16 @@ int main() {
player
.
Play
();
while
(
player
.
IsPlaying
())
{
/*
* Apparently, if I make the sample amount passed to Render larger,
* the synth will segfault somewhere in synth.asm, when writing the
* output samples back to the buffer. I'm not sure if/how this is
* supposed to happen, but keeping the sample count sufficiently low
* works around it. ¯\_(ツ)_/¯
* If you have a better fix, please tell me.
*/
player
.
Render
(
output_buffer
,
64
,
sFALSE
);
write
(
STDOUT_FILENO
,
output_buffer
,
64
*
8
);
//dprintf(STDERR_FILENO,"tick");
write
(
STDOUT_FILENO
,
output_buffer
,
64
*
sizeof
(
sF32
)
*
2
/*stereo*/
);
}
player
.
Close
();
...
...
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