NANA_POSIX for bits common to Linux, MacOS and BSD. OSS sound as fall-back for POSIX. Cheat for detecting default browser on POSIX.

This commit is contained in:
unitrunker
2018-01-21 23:41:52 -06:00
parent 81018c21fd
commit c7434afed8
28 changed files with 415 additions and 176 deletions

View File

@@ -26,6 +26,7 @@ namespace nana{ namespace audio
memset(m, 0, sizeof(meta));
m->dwBufferLength = static_cast<unsigned long>(block_size_);
m->lpData = rawbuf + sizeof(meta);
#elif defined(__FreeBSD__)
#elif defined(NANA_LINUX)
m->bufsize = ck.nAvgBytesPerSec;
m->buf = rawbuf + sizeof(meta);
@@ -124,6 +125,7 @@ namespace nana{ namespace audio
{
#if defined(NANA_WINDOWS)
memcpy(m->lpData + buffered, buf, read_bytes);
#elif defined(__FreeBSD__)
#elif defined(NANA_LINUX)
memcpy(m->buf + buffered, buf, read_bytes);
#endif
@@ -144,6 +146,7 @@ namespace nana{ namespace audio
}
#if defined(NANA_WINDOWS)
m->dwBufferLength = static_cast<unsigned long>(buffered);
#elif defined(__FreeBSD__)
#elif defined(NANA_LINUX)
m->bufsize = buffered;
#endif
@@ -163,4 +166,4 @@ namespace nana{ namespace audio
}//end namespace audio
}//end namespace nana
#endif //NANA_ENABLE_AUDIO
#endif //NANA_ENABLE_AUDIO