diff options
-rw-r--r-- | sys/src/games/gb/audio.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/src/games/gb/audio.c b/sys/src/games/gb/audio.c index 898437446..0af1c0418 100644 --- a/sys/src/games/gb/audio.c +++ b/sys/src/games/gb/audio.c @@ -196,11 +196,26 @@ dosample(short *smp) } void +setpri(int pri) +{ + char buf[64]; + int fd; + + snprint(buf, sizeof(buf), "/proc/%d/ctl", getpid()); + if((fd = open(buf, OWRITE)) >= 0){ + fprint(fd, "pri %d\n", pri); + close(fd); + } +} + +void audioproc(void *) { short samples[10 * 2]; int i; + setpri(13); + for(;;){ if(paused) memset(samples, 0, sizeof samples); |