Skip to content

Commit

Permalink
use hidden visibility by default and explicitly export
Browse files Browse the repository at this point in the history
Also don't expose os functions.
And do the dllexport/dllimport thing.
  • Loading branch information
andrewrk committed Aug 20, 2015
1 parent 843ea28 commit 3b49292
Show file tree
Hide file tree
Showing 21 changed files with 137 additions and 118 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build/
build-win/
build-win32/
build-win64/
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ set(LIBSOUNDIO_SOURCES
set(CONFIGURE_OUT_FILE "${CMAKE_BINARY_DIR}/config.h")
set(LIBSOUNDIO_HEADERS
"${CMAKE_SOURCE_DIR}/soundio/soundio.h"
"${CMAKE_SOURCE_DIR}/soundio/os.h"
${CONFIGURE_OUT_FILE}
)

Expand Down Expand Up @@ -163,7 +162,7 @@ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror -pedantic")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror -pedantic")


set(LIB_CFLAGS "-std=c++11 -fno-exceptions -fno-rtti -Wall -Werror=strict-prototypes -Werror=old-style-definition -Werror=missing-prototypes")
set(LIB_CFLAGS "-std=c++11 -fno-exceptions -fno-rtti -fvisibility=hidden -Wall -Werror=strict-prototypes -Werror=old-style-definition -Werror=missing-prototypes")
set(EXAMPLE_CFLAGS "-std=c99 -Wall")
set(EXAMPLE_INCLUDES "${CMAKE_SOURCE_DIR}/src")
set(TEST_CFLAGS "${LIB_CFLAGS} -fprofile-arcs -ftest-coverage")
Expand Down
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,19 +225,26 @@ packages necessary on your system. Then somewhere on your file system:
```
git clone https://github.com/mxe/mxe
cd mxe
make gcc
make MXE_TARGETS='x86_64-w64-mingw32.static i686-w64-mingw32.static' gcc
```
Then in the libsoundio source directory (replace "/path/to/mxe" with the
appropriate path):
```
mkdir build-win
cd build-win
mkdir build-win32
cd build-win32
cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/mxe/usr/i686-w64-mingw32.static/share/cmake/mxe-conf.cmake
make
```
```
mkdir build-win64
cd build-win64
cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/mxe/usr/x86_64-w64-mingw32.static/share/cmake/mxe-conf.cmake
make
```
#### Running the Tests
```
Expand All @@ -257,8 +264,9 @@ view `coverage/index.html` in a browser.
## Roadmap
0. implement WASAPI (Windows) backend, get examples working
- sine wave
- sine wave (raw device)
- microphone
- set display name of output stream
0. Make sure PulseAudio can handle refresh devices crashing before
block_until_have_devices
0. Integrate into libgroove and test with Groove Basin
Expand All @@ -283,8 +291,6 @@ view `coverage/index.html` in a browser.
- make sure every function which can return an error documents which errors
it can return
0. use a documentation generator and host the docs somewhere
0. -fvisibility=hidden and then explicitly export stuff, or
explicitly make the unexported stuff private
0. add len arguments to APIs that have char *
- replace strdup with `soundio_str_dupe`
0. Support PulseAudio proplist properties for main context and streams
Expand All @@ -298,6 +304,10 @@ view `coverage/index.html` in a browser.
0. In ALSA do we need to wake up the poll when destroying the in or out stream?
0. Detect PulseAudio server going offline and emit `on_backend_disconnect`.
0. Add [sndio](http://www.sndio.org/) backend to support OpenBSD.
0. Support for stream icon.
- PulseAudio: XDG icon name
- WASAPI: path to .exe, .dll, or .ico
- CoreAudio: CFURLRef image file
## Planned Uses for libsoundio
Expand Down
Loading

0 comments on commit 3b49292

Please sign in to comment.