no longer ship config.h header

Instead provide these functions:

 * soundio_version_string
 * soundio_version_major
 * soundio_version_minor
 * soundio_version_patch
This commit is contained in:
Andrew Kelley 2015-11-23 13:51:25 -07:00
parent 72fde44073
commit ce42b89da3
5 changed files with 26 additions and 4 deletions

View file

@ -147,7 +147,6 @@ set(CONFIGURE_OUT_FILE "${CMAKE_BINARY_DIR}/config.h")
set(LIBSOUNDIO_HEADERS
"${CMAKE_SOURCE_DIR}/soundio/soundio.h"
"${CMAKE_SOURCE_DIR}/soundio/endian.h"
${CONFIGURE_OUT_FILE}
)
if(SOUNDIO_HAVE_JACK)

View file

@ -1,6 +1,6 @@
# libsoundio
C99 library providing cross-platform audio input and output. The API is
C library providing cross-platform audio input and output. The API is
suitable for real-time software such as digital audio workstations as well
as consumer software such as music players.

View file

@ -8,7 +8,6 @@
#ifndef SOUNDIO_SOUNDIO_H
#define SOUNDIO_SOUNDIO_H
#include "config.h"
#include "endian.h"
#include <stdbool.h>
@ -670,7 +669,14 @@ struct SoundIoInStream {
int layout_error;
};
// Main Context
/// See also ::soundio_version_major, ::soundio_version_minor, ::soundio_version_patch
SOUNDIO_EXPORT const char *soundio_version_string(void);
/// See also ::soundio_version_string, ::soundio_version_minor, ::soundio_version_patch
SOUNDIO_EXPORT int soundio_version_major(void);
/// See also ::soundio_version_major, ::soundio_version_string, ::soundio_version_patch
SOUNDIO_EXPORT int soundio_version_minor(void);
/// See also ::soundio_version_major, ::soundio_version_minor, ::soundio_version_string
SOUNDIO_EXPORT int soundio_version_patch(void);
/// Create a SoundIo context. You may create multiple instances of this to
/// connect to multiple backends. Sets all fields to defaults.

View file

@ -801,3 +801,19 @@ bool soundio_device_equal(
{
return a->is_raw == b->is_raw && a->aim == b->aim && strcmp(a->id, b->id) == 0;
}
const char *soundio_version_string(void) {
return SOUNDIO_VERSION_STRING;
}
int soundio_version_major(void) {
return SOUNDIO_VERSION_MAJOR;
}
int soundio_version_minor(void) {
return SOUNDIO_VERSION_MINOR;
}
int soundio_version_patch(void) {
return SOUNDIO_VERSION_PATCH;
}

View file

@ -9,6 +9,7 @@
#define SOUNDIO_SOUNDIO_PRIVATE_H
#include "soundio_internal.h"
#include "config.h"
#ifdef SOUNDIO_HAVE_JACK
#include "jack.h"