Remove debug output
This commit is contained in:
parent
e25590539e
commit
2df90152fe
@ -9,7 +9,6 @@
|
|||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
|
|
||||||
#define NOTE_PAUSE 20
|
#define NOTE_PAUSE 20
|
||||||
|
|
||||||
namespace music {
|
namespace music {
|
||||||
@ -18,7 +17,6 @@ uint8_t currVolume = 2;
|
|||||||
uint8_t *lmsSoundMMap;
|
uint8_t *lmsSoundMMap;
|
||||||
|
|
||||||
int writeDev(void *data, int size) {
|
int writeDev(void *data, int size) {
|
||||||
DMESG("write dev %d", size);
|
|
||||||
int fd = open("/dev/lms_sound", O_WRONLY);
|
int fd = open("/dev/lms_sound", O_WRONLY);
|
||||||
int res = write(fd, data, size);
|
int res = write(fd, data, size);
|
||||||
close(fd);
|
close(fd);
|
||||||
@ -77,8 +75,7 @@ static void pumpMusic() {
|
|||||||
if (currentSample == NULL) {
|
if (currentSample == NULL) {
|
||||||
if (samplePtr > 0 && *lmsSoundMMap == 0) {
|
if (samplePtr > 0 && *lmsSoundMMap == 0) {
|
||||||
samplePtr = 0;
|
samplePtr = 0;
|
||||||
DMESG("END");
|
pthread_cond_broadcast(&sampleDone);
|
||||||
pthread_cond_broadcast(&sampleDone);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -87,7 +84,6 @@ static void pumpMusic() {
|
|||||||
buf[0] = SOUND_CMD_SERVICE;
|
buf[0] = SOUND_CMD_SERVICE;
|
||||||
int len = min((int)sizeof(buf) - 1, currentSample->length - samplePtr);
|
int len = min((int)sizeof(buf) - 1, currentSample->length - samplePtr);
|
||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
DMESG("EOF");
|
|
||||||
decrRC(currentSample);
|
decrRC(currentSample);
|
||||||
currentSample = NULL;
|
currentSample = NULL;
|
||||||
return;
|
return;
|
||||||
@ -112,8 +108,7 @@ static void *pumpMusicThread(void *dummy) {
|
|||||||
void playSample(Buffer buf) {
|
void playSample(Buffer buf) {
|
||||||
if (lmsSoundMMap == NULL) {
|
if (lmsSoundMMap == NULL) {
|
||||||
int fd = open("/dev/lms_sound", O_RDWR);
|
int fd = open("/dev/lms_sound", O_RDWR);
|
||||||
lmsSoundMMap = (uint8_t*) mmap(NULL, 1, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
lmsSoundMMap = (uint8_t *)mmap(NULL, 1, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
||||||
DMESG("sound map: %p", lmsSoundMMap);
|
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,5 +184,4 @@ Buffer buffer(Sound snd) {
|
|||||||
void play(Sound snd) {
|
void play(Sound snd) {
|
||||||
music::playSample(snd);
|
music::playSample(snd);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user