Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Aayush
purr-data
Commits
e04a0760
Commit
e04a0760
authored
Dec 17, 2008
by
Miller Puckette
Browse files
msw fix
parent
ee23ddc6
Changes
1
Show whitespace changes
Inline
Side-by-side
src/s_audio_pa.c
View file @
e04a0760
...
...
@@ -11,7 +11,6 @@
#include "s_stuff.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <portaudio.h>
#include "s_audio_pablio.h"
...
...
@@ -30,11 +29,15 @@ static t_audiocallback pa_callback;
int
pa_foo
;
#ifndef MSW
#include <unistd.h>
#endif
static
void
pa_init
(
void
)
{
static
int
initialized
;
if
(
!
initialized
)
{
#ifndef MSW
/* Initialize PortAudio */
/* for some reason Pa_Initialize(0 closes file descriptor 1.
As a workaround, dup it to another number and dup2 it back
...
...
@@ -46,6 +49,9 @@ static void pa_init(void)
dup2
(
newfd
,
1
);
close
(
newfd
);
}
#else
int
err
=
Pa_Initialize
();
#endif
if
(
err
!=
paNoError
)
{
fprintf
(
stderr
,
...
...
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