Skip to content

Commit

Permalink
Revert "libs"
Browse files Browse the repository at this point in the history
This reverts commit c6a871a.
  • Loading branch information
laves committed Oct 6, 2023
1 parent c6a871a commit 9b6e090
Show file tree
Hide file tree
Showing 26 changed files with 60 additions and 52 deletions.
Binary file modified lib/android/arm64-v8a/libpv_cobra.so
Binary file not shown.
Binary file modified lib/android/armeabi-v7a/libpv_cobra.so
Binary file not shown.
Binary file modified lib/android/x86/libpv_cobra.so
Binary file not shown.
Binary file modified lib/android/x86_64/libpv_cobra.so
Binary file not shown.
Binary file modified lib/beaglebone/libpv_cobra.so
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2018-2023 Picovoice Inc.
Copyright 2018-2021 Picovoice Inc.
You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE"
file accompanying this source.
Expand Down Expand Up @@ -31,7 +31,17 @@ PV_API int32_t pv_sample_rate(void);
* Status codes.
*/
typedef enum {

#ifdef __PV_PLATFORM_WASM__

PV_STATUS_SUCCESS = 10000,

#else

PV_STATUS_SUCCESS = 0,

#endif

PV_STATUS_OUT_OF_MEMORY,
PV_STATUS_IO_ERROR,
PV_STATUS_INVALID_ARGUMENT,
Expand All @@ -53,30 +63,6 @@ typedef enum {
*/
PV_API const char *pv_status_to_string(pv_status_t status);

/**
* If a function returns a failure (any pv_status_t other than PV_STATUS_SUCCESS), this function can be called
* to get a series of error messages related to the failure. This function can only be called only once per
* failure status on another function. The memory for `message_stack` must be freed using `pv_free_error_stack`.
*
* Regardless of the return status of this function, if `message_stack` is not `NULL`, then `message_stack`
* contains valid memory. However, a failure status on this function indicates that future error messages
* may not be reported.
*
* @param[out] message_stack Array of messages relating to the failure. Messages are NULL terminated strings.
* The array and messages must be freed using `pv_free_error_stack`.
* @param[out] message_stack_depth The number of messages in the `message_stack` array.
*/
PV_API pv_status_t pv_get_error_stack(
char ***message_stack,
int32_t *message_stack_depth);

/**
* This function frees the memory used by error messages allocated by `pv_get_error_stack`.
*
* @param message_stack Array of messages relating to the failure, allocated from `pv_get_error_stack`.
*/
PV_API void pv_free_error_stack(char **message_stack);

#ifdef __cplusplus
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

#ifdef __cplusplus

extern "C" {
extern "C"

{

#endif

Expand All @@ -32,6 +34,20 @@ extern "C" {
*/
typedef struct pv_cobra pv_cobra_t;

#ifdef __PV_NO_DYNAMIC_MEMORY__

/**
* Constructor.
*
* @param memory_size Memory size in bytes.
* @param memory_buffer Memory buffer needs to be 8-byte aligned.
* @param[out] object Constructed instance of Cobra.
* @return Status code. Returns `PV_STATUS_INVALID_ARGUMENT` or `PV_STATUS_OUT_OF_MEMORY` on failure.
*/
PV_API pv_status_t pv_cobra_init(int32_t memory_size, void *memory_buffer, pv_cobra_t **object);

#else

/**
* Constructor.
*
Expand All @@ -43,6 +59,8 @@ typedef struct pv_cobra pv_cobra_t;
*/
PV_API pv_status_t pv_cobra_init(const char *access_key, pv_cobra_t **object);

#endif

/**
* Destructor.
*
Expand Down
Binary file not shown.
Binary file modified lib/ios/PvCobra.xcframework/ios-arm64/PvCobra.framework/PvCobra
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2018-2023 Picovoice Inc.
Copyright 2018-2021 Picovoice Inc.
You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE"
file accompanying this source.
Expand Down Expand Up @@ -31,7 +31,17 @@ PV_API int32_t pv_sample_rate(void);
* Status codes.
*/
typedef enum {

#ifdef __PV_PLATFORM_WASM__

PV_STATUS_SUCCESS = 10000,

#else

PV_STATUS_SUCCESS = 0,

#endif

PV_STATUS_OUT_OF_MEMORY,
PV_STATUS_IO_ERROR,
PV_STATUS_INVALID_ARGUMENT,
Expand All @@ -53,30 +63,6 @@ typedef enum {
*/
PV_API const char *pv_status_to_string(pv_status_t status);

/**
* If a function returns a failure (any pv_status_t other than PV_STATUS_SUCCESS), this function can be called
* to get a series of error messages related to the failure. This function can only be called only once per
* failure status on another function. The memory for `message_stack` must be freed using `pv_free_error_stack`.
*
* Regardless of the return status of this function, if `message_stack` is not `NULL`, then `message_stack`
* contains valid memory. However, a failure status on this function indicates that future error messages
* may not be reported.
*
* @param[out] message_stack Array of messages relating to the failure. Messages are NULL terminated strings.
* The array and messages must be freed using `pv_free_error_stack`.
* @param[out] message_stack_depth The number of messages in the `message_stack` array.
*/
PV_API pv_status_t pv_get_error_stack(
char ***message_stack,
int32_t *message_stack_depth);

/**
* This function frees the memory used by error messages allocated by `pv_get_error_stack`.
*
* @param message_stack Array of messages relating to the failure, allocated from `pv_get_error_stack`.
*/
PV_API void pv_free_error_stack(char **message_stack);

#ifdef __cplusplus
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

#ifdef __cplusplus

extern "C" {
extern "C"

{

#endif

Expand All @@ -32,6 +34,20 @@ extern "C" {
*/
typedef struct pv_cobra pv_cobra_t;

#ifdef __PV_NO_DYNAMIC_MEMORY__

/**
* Constructor.
*
* @param memory_size Memory size in bytes.
* @param memory_buffer Memory buffer needs to be 8-byte aligned.
* @param[out] object Constructed instance of Cobra.
* @return Status code. Returns `PV_STATUS_INVALID_ARGUMENT` or `PV_STATUS_OUT_OF_MEMORY` on failure.
*/
PV_API pv_status_t pv_cobra_init(int32_t memory_size, void *memory_buffer, pv_cobra_t **object);

#else

/**
* Constructor.
*
Expand All @@ -43,6 +59,8 @@ typedef struct pv_cobra pv_cobra_t;
*/
PV_API pv_status_t pv_cobra_init(const char *access_key, pv_cobra_t **object);

#endif

/**
* Destructor.
*
Expand Down
Binary file not shown.
Binary file not shown.
Binary file modified lib/jetson/cortex-a57-aarch64/libpv_cobra.so
Binary file not shown.
Binary file modified lib/linux/x86_64/libpv_cobra.so
Binary file not shown.
Binary file modified lib/mac/arm64/libpv_cobra.dylib
Binary file not shown.
Binary file modified lib/mac/x86_64/libpv_cobra.dylib
Binary file not shown.
Binary file modified lib/raspberry-pi/arm11/libpv_cobra.so
Binary file not shown.
Binary file modified lib/raspberry-pi/cortex-a53-aarch64/libpv_cobra.so
Binary file not shown.
Binary file modified lib/raspberry-pi/cortex-a53/libpv_cobra.so
Binary file not shown.
Binary file modified lib/raspberry-pi/cortex-a7/libpv_cobra.so
Binary file not shown.
Binary file modified lib/raspberry-pi/cortex-a72-aarch64/libpv_cobra.so
Binary file not shown.
Binary file modified lib/raspberry-pi/cortex-a72/libpv_cobra.so
Binary file not shown.
Binary file modified lib/wasm/pv_cobra.wasm
Binary file not shown.
Binary file modified lib/wasm/pv_cobra_simd.wasm
Binary file not shown.
Binary file modified lib/windows/amd64/libpv_cobra.dll
Binary file not shown.

0 comments on commit 9b6e090

Please sign in to comment.