From 50dfb4359619563012997bc3ddafb7667741066c Mon Sep 17 00:00:00 2001 From: Mamadou DIOP Date: Tue, 23 Feb 2016 22:00:35 +0100 Subject: Add new QoS implementation Code formatting --- thirdparties/mac/include/speex/speex.h | 84 ++++++------ thirdparties/mac/include/speex/speex_bits.h | 44 +++--- thirdparties/mac/include/speex/speex_buffer.h | 2 +- thirdparties/mac/include/speex/speex_callbacks.h | 18 +-- thirdparties/mac/include/speex/speex_echo.h | 10 +- thirdparties/mac/include/speex/speex_header.h | 38 +++--- thirdparties/mac/include/speex/speex_jitter.h | 52 ++++---- thirdparties/mac/include/speex/speex_preprocess.h | 12 +- thirdparties/mac/include/speex/speex_resampler.h | 156 +++++++++++----------- thirdparties/mac/include/speex/speex_stereo.h | 20 +-- thirdparties/mac/include/speex/speex_types.h | 114 ++++++++-------- 11 files changed, 275 insertions(+), 275 deletions(-) (limited to 'thirdparties/mac/include/speex') diff --git a/thirdparties/mac/include/speex/speex.h b/thirdparties/mac/include/speex/speex.h index 82ba016..0eb560e 100755 --- a/thirdparties/mac/include/speex/speex.h +++ b/thirdparties/mac/include/speex/speex.h @@ -7,18 +7,18 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + - Neither the name of the Xiph.org Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -245,70 +245,70 @@ typedef int (*decoder_ctl_func)(void *state, int request, void *ptr); /** Query function for a mode */ typedef int (*mode_query_func)(const void *mode, int request, void *ptr); -/** Struct defining a Speex mode */ +/** Struct defining a Speex mode */ typedef struct SpeexMode { - /** Pointer to the low-level mode data */ - const void *mode; + /** Pointer to the low-level mode data */ + const void *mode; + + /** Pointer to the mode query function */ + mode_query_func query; - /** Pointer to the mode query function */ - mode_query_func query; - - /** The name of the mode (you should not rely on this to identify the mode)*/ - const char *modeName; + /** The name of the mode (you should not rely on this to identify the mode)*/ + const char *modeName; - /**ID of the mode*/ - int modeID; + /**ID of the mode*/ + int modeID; - /**Version number of the bitstream (incremented every time we break - bitstream compatibility*/ - int bitstream_version; + /**Version number of the bitstream (incremented every time we break + bitstream compatibility*/ + int bitstream_version; - /** Pointer to encoder initialization function */ - encoder_init_func enc_init; + /** Pointer to encoder initialization function */ + encoder_init_func enc_init; - /** Pointer to encoder destruction function */ - encoder_destroy_func enc_destroy; + /** Pointer to encoder destruction function */ + encoder_destroy_func enc_destroy; - /** Pointer to frame encoding function */ - encode_func enc; + /** Pointer to frame encoding function */ + encode_func enc; - /** Pointer to decoder initialization function */ - decoder_init_func dec_init; + /** Pointer to decoder initialization function */ + decoder_init_func dec_init; - /** Pointer to decoder destruction function */ - decoder_destroy_func dec_destroy; + /** Pointer to decoder destruction function */ + decoder_destroy_func dec_destroy; - /** Pointer to frame decoding function */ - decode_func dec; + /** Pointer to frame decoding function */ + decode_func dec; - /** ioctl-like requests for encoder */ - encoder_ctl_func enc_ctl; + /** ioctl-like requests for encoder */ + encoder_ctl_func enc_ctl; - /** ioctl-like requests for decoder */ - decoder_ctl_func dec_ctl; + /** ioctl-like requests for decoder */ + decoder_ctl_func dec_ctl; } SpeexMode; /** - * Returns a handle to a newly created Speex encoder state structure. For now, - * the "mode" argument can be &nb_mode or &wb_mode . In the future, more modes - * may be added. Note that for now if you have more than one channels to + * Returns a handle to a newly created Speex encoder state structure. For now, + * the "mode" argument can be &nb_mode or &wb_mode . In the future, more modes + * may be added. Note that for now if you have more than one channels to * encode, you need one state per channel. * - * @param mode The mode to use (either speex_nb_mode or speex_wb.mode) + * @param mode The mode to use (either speex_nb_mode or speex_wb.mode) * @return A newly created encoder state or NULL if state allocation fails */ void *speex_encoder_init(const SpeexMode *mode); -/** Frees all resources associated to an existing Speex encoder state. +/** Frees all resources associated to an existing Speex encoder state. * @param state Encoder state to be destroyed */ void speex_encoder_destroy(void *state); /** Uses an existing encoder state to encode one frame of speech pointed to by "in". The encoded bit-stream is saved in "bits". @param state Encoder state - @param in Frame that will be encoded with a +-2^15 range. This data MAY be - overwritten by the encoder and should be considered uninitialised + @param in Frame that will be encoded with a +-2^15 range. This data MAY be + overwritten by the encoder and should be considered uninitialised after the call. @param bits Bit-stream where the data will be written @return 0 if frame needs not be transmitted (DTX only), 1 otherwise @@ -334,14 +334,14 @@ int speex_encode_int(void *state, spx_int16_t *in, SpeexBits *bits); int speex_encoder_ctl(void *state, int request, void *ptr); -/** Returns a handle to a newly created decoder state structure. For now, +/** Returns a handle to a newly created decoder state structure. For now, * the mode argument can be &nb_mode or &wb_mode . In the future, more modes * may be added. Note that for now if you have more than one channels to * decode, you need one state per channel. * * @param mode Speex mode (one of speex_nb_mode or speex_wb_mode) * @return A newly created decoder state or NULL if state allocation fails - */ + */ void *speex_decoder_init(const SpeexMode *mode); /** Frees all resources associated to an existing decoder state. diff --git a/thirdparties/mac/include/speex/speex_bits.h b/thirdparties/mac/include/speex/speex_bits.h index a26fb4c..dd3b752 100755 --- a/thirdparties/mac/include/speex/speex_bits.h +++ b/thirdparties/mac/include/speex/speex_bits.h @@ -7,18 +7,18 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + - Neither the name of the Xiph.org Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -47,15 +47,15 @@ extern "C" { /** Bit-packing data structure representing (part of) a bit-stream. */ typedef struct SpeexBits { - char *chars; /**< "raw" data */ - int nbBits; /**< Total number of bits stored in the stream*/ - int charPtr; /**< Position of the byte "cursor" */ - int bitPtr; /**< Position of the bit "cursor" within the current char */ - int owner; /**< Does the struct "own" the "raw" buffer (member "chars") */ - int overflow;/**< Set to one if we try to read past the valid data */ - int buf_size;/**< Allocated size for buffer */ - int reserved1; /**< Reserved for future use */ - void *reserved2; /**< Reserved for future use */ + char *chars; /**< "raw" data */ + int nbBits; /**< Total number of bits stored in the stream*/ + int charPtr; /**< Position of the byte "cursor" */ + int bitPtr; /**< Position of the bit "cursor" within the current char */ + int owner; /**< Does the struct "own" the "raw" buffer (member "chars") */ + int overflow;/**< Set to one if we try to read past the valid data */ + int buf_size;/**< Allocated size for buffer */ + int reserved1; /**< Reserved for future use */ + void *reserved2; /**< Reserved for future use */ } SpeexBits; /** Initializes and allocates resources for a SpeexBits struct */ @@ -80,7 +80,7 @@ void speex_bits_rewind(SpeexBits *bits); void speex_bits_read_from(SpeexBits *bits, char *bytes, int len); /** Append bytes to the bit-stream - * + * * @param bits Bit-stream to operate on * @param bytes pointer to the bytes what will be appended * @param len Number of bytes of append @@ -88,7 +88,7 @@ void speex_bits_read_from(SpeexBits *bits, char *bytes, int len); void speex_bits_read_whole_bytes(SpeexBits *bits, char *bytes, int len); /** Write the content of a bit-stream to an area of memory - * + * * @param bits Bit-stream to operate on * @param bytes Memory location where to write the bits * @param max_len Maximum number of bytes to write (i.e. size of the "bytes" buffer) @@ -129,8 +129,8 @@ unsigned int speex_bits_unpack_unsigned(SpeexBits *bits, int nbBits); */ int speex_bits_nbytes(SpeexBits *bits); -/** Same as speex_bits_unpack_unsigned, but without modifying the cursor position - * +/** Same as speex_bits_unpack_unsigned, but without modifying the cursor position + * * @param bits Bit-stream to operate on * @param nbBits Number of bits to look for * @return Value of the bits peeked, interpreted as unsigned @@ -138,14 +138,14 @@ int speex_bits_nbytes(SpeexBits *bits); unsigned int speex_bits_peek_unsigned(SpeexBits *bits, int nbBits); /** Get the value of the next bit in the stream, without modifying the - * "cursor" position - * + * "cursor" position + * * @param bits Bit-stream to operate on * @return Value of the bit peeked (one bit only) */ int speex_bits_peek(SpeexBits *bits); -/** Advances the position of the "bit cursor" in the stream +/** Advances the position of the "bit cursor" in the stream * * @param bits Bit-stream to operate on * @param n Number of bits to advance @@ -159,8 +159,8 @@ void speex_bits_advance(SpeexBits *bits, int n); */ int speex_bits_remaining(SpeexBits *bits); -/** Insert a terminator so that the data can be sent as a packet while auto-detecting - * the number of frames in each packet +/** Insert a terminator so that the data can be sent as a packet while auto-detecting + * the number of frames in each packet * * @param bits Bit-stream to operate on */ diff --git a/thirdparties/mac/include/speex/speex_buffer.h b/thirdparties/mac/include/speex/speex_buffer.h index df56f5f..909bd6d 100755 --- a/thirdparties/mac/include/speex/speex_buffer.h +++ b/thirdparties/mac/include/speex/speex_buffer.h @@ -1,5 +1,5 @@ /* Copyright (C) 2007 Jean-Marc Valin - + File: speex_buffer.h This is a very simple ring buffer implementation. It is not thread-safe so you need to do your own locking. diff --git a/thirdparties/mac/include/speex/speex_callbacks.h b/thirdparties/mac/include/speex/speex_callbacks.h index 6f450b3..27b5649 100755 --- a/thirdparties/mac/include/speex/speex_callbacks.h +++ b/thirdparties/mac/include/speex/speex_callbacks.h @@ -7,18 +7,18 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + - Neither the name of the Xiph.org Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -89,11 +89,11 @@ typedef int (*speex_callback_func)(SpeexBits *bits, void *state, void *data); /** Callback information */ typedef struct SpeexCallback { - int callback_id; /**< ID associated to the callback */ - speex_callback_func func; /**< Callback handler function */ - void *data; /**< Data that will be sent to the handler */ - void *reserved1; /**< Reserved for future use */ - int reserved2; /**< Reserved for future use */ + int callback_id; /**< ID associated to the callback */ + speex_callback_func func; /**< Callback handler function */ + void *data; /**< Data that will be sent to the handler */ + void *reserved1; /**< Reserved for future use */ + int reserved2; /**< Reserved for future use */ } SpeexCallback; /** Handle in-band request */ diff --git a/thirdparties/mac/include/speex/speex_echo.h b/thirdparties/mac/include/speex/speex_echo.h index 53bcd28..582e1cc 100755 --- a/thirdparties/mac/include/speex/speex_echo.h +++ b/thirdparties/mac/include/speex/speex_echo.h @@ -63,7 +63,7 @@ extern "C" { struct SpeexEchoState_; /** @class SpeexEchoState - * This holds the state of the echo canceller. You need one per channel. + * This holds the state of the echo canceller. You need one per channel. */ /** Internal echo canceller state. Should never be accessed directly. */ @@ -85,7 +85,7 @@ SpeexEchoState *speex_echo_state_init(int frame_size, int filter_length); */ SpeexEchoState *speex_echo_state_init_mc(int frame_size, int filter_length, int nb_mic, int nb_speakers); -/** Destroys an echo canceller state +/** Destroys an echo canceller state * @param st Echo canceller state */ void speex_echo_state_destroy(SpeexEchoState *st); @@ -117,7 +117,7 @@ void speex_echo_capture(SpeexEchoState *st, const spx_int16_t *rec, spx_int16_t */ void speex_echo_playback(SpeexEchoState *st, const spx_int16_t *play); -/** Reset the echo canceller to its original state +/** Reset the echo canceller to its original state * @param st Echo canceller state */ void speex_echo_state_reset(SpeexEchoState *st); @@ -139,7 +139,7 @@ typedef struct SpeexDecorrState_ SpeexDecorrState; /** Create a state for the channel decorrelation algorithm - This is useful for multi-channel echo cancellation only + This is useful for multi-channel echo cancellation only * @param rate Sampling rate * @param channels Number of channels (it's a bit pointless if you don't have at least 2) * @param frame_size Size of the frame to process at ones (counting samples *per* channel) @@ -155,7 +155,7 @@ SpeexDecorrState *speex_decorrelate_new(int rate, int channels, int frame_size); */ void speex_decorrelate(SpeexDecorrState *st, const spx_int16_t *in, spx_int16_t *out, int strength); -/** Destroy a Decorrelation state +/** Destroy a Decorrelation state * @param st State to destroy */ void speex_decorrelate_destroy(SpeexDecorrState *st); diff --git a/thirdparties/mac/include/speex/speex_header.h b/thirdparties/mac/include/speex/speex_header.h index f85b249..4cc15df 100755 --- a/thirdparties/mac/include/speex/speex_header.h +++ b/thirdparties/mac/include/speex/speex_header.h @@ -7,18 +7,18 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + - Neither the name of the Xiph.org Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -57,21 +57,21 @@ struct SpeexMode; /** Speex header info for file-based formats */ typedef struct SpeexHeader { - char speex_string[SPEEX_HEADER_STRING_LENGTH]; /**< Identifies a Speex bit-stream, always set to "Speex " */ - char speex_version[SPEEX_HEADER_VERSION_LENGTH]; /**< Speex version */ - spx_int32_t speex_version_id; /**< Version for Speex (for checking compatibility) */ - spx_int32_t header_size; /**< Total size of the header ( sizeof(SpeexHeader) ) */ - spx_int32_t rate; /**< Sampling rate used */ - spx_int32_t mode; /**< Mode used (0 for narrowband, 1 for wideband) */ - spx_int32_t mode_bitstream_version; /**< Version ID of the bit-stream */ - spx_int32_t nb_channels; /**< Number of channels encoded */ - spx_int32_t bitrate; /**< Bit-rate used */ - spx_int32_t frame_size; /**< Size of frames */ - spx_int32_t vbr; /**< 1 for a VBR encoding, 0 otherwise */ - spx_int32_t frames_per_packet; /**< Number of frames stored per Ogg packet */ - spx_int32_t extra_headers; /**< Number of additional headers after the comments */ - spx_int32_t reserved1; /**< Reserved for future use, must be zero */ - spx_int32_t reserved2; /**< Reserved for future use, must be zero */ + char speex_string[SPEEX_HEADER_STRING_LENGTH]; /**< Identifies a Speex bit-stream, always set to "Speex " */ + char speex_version[SPEEX_HEADER_VERSION_LENGTH]; /**< Speex version */ + spx_int32_t speex_version_id; /**< Version for Speex (for checking compatibility) */ + spx_int32_t header_size; /**< Total size of the header ( sizeof(SpeexHeader) ) */ + spx_int32_t rate; /**< Sampling rate used */ + spx_int32_t mode; /**< Mode used (0 for narrowband, 1 for wideband) */ + spx_int32_t mode_bitstream_version; /**< Version ID of the bit-stream */ + spx_int32_t nb_channels; /**< Number of channels encoded */ + spx_int32_t bitrate; /**< Bit-rate used */ + spx_int32_t frame_size; /**< Size of frames */ + spx_int32_t vbr; /**< 1 for a VBR encoding, 0 otherwise */ + spx_int32_t frames_per_packet; /**< Number of frames stored per Ogg packet */ + spx_int32_t extra_headers; /**< Number of additional headers after the comments */ + spx_int32_t reserved1; /**< Reserved for future use, must be zero */ + spx_int32_t reserved2; /**< Reserved for future use, must be zero */ } SpeexHeader; /** Initializes a SpeexHeader using basic information */ diff --git a/thirdparties/mac/include/speex/speex_jitter.h b/thirdparties/mac/include/speex/speex_jitter.h index d68674b..e6f0321 100755 --- a/thirdparties/mac/include/speex/speex_jitter.h +++ b/thirdparties/mac/include/speex/speex_jitter.h @@ -7,18 +7,18 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + - Neither the name of the Xiph.org Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -58,12 +58,12 @@ typedef struct _JitterBufferPacket JitterBufferPacket; /** Definition of an incoming packet */ struct _JitterBufferPacket { - char *data; /**< Data bytes contained in the packet */ - spx_uint32_t len; /**< Length of the packet in bytes */ - spx_uint32_t timestamp; /**< Timestamp for the packet */ - spx_uint32_t span; /**< Time covered by the packet (same units as timestamp) */ - spx_uint16_t sequence; /**< RTP Sequence number if available (0 otherwise) */ - spx_uint32_t user_data; /**< Put whatever data you like here (it's ignored by the jitter buffer) */ + char *data; /**< Data bytes contained in the packet */ + spx_uint32_t len; /**< Length of the packet in bytes */ + spx_uint32_t timestamp; /**< Timestamp for the packet */ + spx_uint32_t span; /**< Time covered by the packet (same units as timestamp) */ + spx_uint16_t sequence; /**< RTP Sequence number if available (0 otherwise) */ + spx_uint32_t user_data; /**< Put whatever data you like here (it's ignored by the jitter buffer) */ }; /** Packet has been retrieved */ @@ -89,7 +89,7 @@ struct _JitterBufferPacket { /** Included because of an early misspelling (will remove in next release) */ #define JITTER_BUFFER_GET_AVALIABLE_COUNT 3 -/** Assign a function to destroy unused packet. When setting that, the jitter +/** Assign a function to destroy unused packet. When setting that, the jitter buffer no longer copies packet data. */ #define JITTER_BUFFER_SET_DESTROY_CALLBACK 4 /** */ @@ -104,7 +104,7 @@ struct _JitterBufferPacket { #define JITTER_BUFFER_SET_CONCEALMENT_SIZE 8 #define JITTER_BUFFER_GET_CONCEALMENT_SIZE 9 -/** Absolute max amount of loss that can be tolerated regardless of the delay. Typical loss +/** Absolute max amount of loss that can be tolerated regardless of the delay. Typical loss should be half of that or less. */ #define JITTER_BUFFER_SET_MAX_LATE_RATE 10 #define JITTER_BUFFER_GET_MAX_LATE_RATE 11 @@ -114,59 +114,59 @@ struct _JitterBufferPacket { #define JITTER_BUFFER_GET_LATE_COST 13 -/** Initialises jitter buffer - * - * @param step_size Starting value for the size of concleanment packets and delay +/** Initialises jitter buffer + * + * @param step_size Starting value for the size of concleanment packets and delay adjustment steps. Can be changed at any time using JITTER_BUFFER_SET_DELAY_STEP and JITTER_BUFFER_GET_CONCEALMENT_SIZE. * @return Newly created jitter buffer state */ JitterBuffer *jitter_buffer_init(int step_size); -/** Restores jitter buffer to its original state - * +/** Restores jitter buffer to its original state + * * @param jitter Jitter buffer state */ void jitter_buffer_reset(JitterBuffer *jitter); -/** Destroys jitter buffer - * +/** Destroys jitter buffer + * * @param jitter Jitter buffer state */ void jitter_buffer_destroy(JitterBuffer *jitter); /** Put one packet into the jitter buffer - * + * * @param jitter Jitter buffer state * @param packet Incoming packet */ void jitter_buffer_put(JitterBuffer *jitter, const JitterBufferPacket *packet); /** Get one packet from the jitter buffer - * + * * @param jitter Jitter buffer state * @param packet Returned packet * @param desired_span Number of samples (or units) we wish to get from the buffer (no guarantee) - * @param current_timestamp Timestamp for the returned packet + * @param current_timestamp Timestamp for the returned packet */ int jitter_buffer_get(JitterBuffer *jitter, JitterBufferPacket *packet, spx_int32_t desired_span, spx_int32_t *start_offset); /** Used right after jitter_buffer_get() to obtain another packet that would have the same timestamp. * This is mainly useful for media where a single "frame" can be split into several packets. - * + * * @param jitter Jitter buffer state * @param packet Returned packet */ int jitter_buffer_get_another(JitterBuffer *jitter, JitterBufferPacket *packet); /** Get pointer timestamp of jitter buffer - * + * * @param jitter Jitter buffer state */ int jitter_buffer_get_pointer_timestamp(JitterBuffer *jitter); /** Advance by one tick - * + * * @param jitter Jitter buffer state */ void jitter_buffer_tick(JitterBuffer *jitter); @@ -178,7 +178,7 @@ void jitter_buffer_tick(JitterBuffer *jitter); void jitter_buffer_remaining_span(JitterBuffer *jitter, spx_uint32_t rem); /** Used like the ioctl function to control the jitter buffer parameters - * + * * @param jitter Jitter buffer state * @param request ioctl-type request (one of the JITTER_BUFFER_* macros) * @param ptr Data exchanged to-from function diff --git a/thirdparties/mac/include/speex/speex_preprocess.h b/thirdparties/mac/include/speex/speex_preprocess.h index f8eef2c..5cd3710 100755 --- a/thirdparties/mac/include/speex/speex_preprocess.h +++ b/thirdparties/mac/include/speex/speex_preprocess.h @@ -2,7 +2,7 @@ Written by Jean-Marc Valin */ /** * @file speex_preprocess.h - * @brief Speex preprocessor. The preprocess can do noise suppression, + * @brief Speex preprocessor. The preprocess can do noise suppression, * residual echo suppression (after using the echo canceller), automatic * gain control (AGC) and voice activity detection (VAD). */ @@ -37,7 +37,7 @@ #ifndef SPEEX_PREPROCESS_H #define SPEEX_PREPROCESS_H /** @defgroup SpeexPreprocessState SpeexPreprocessState: The Speex preprocessor - * This is the Speex preprocessor. The preprocess can do noise suppression, + * This is the Speex preprocessor. The preprocess can do noise suppression, * residual echo suppression (after using the echo canceller), automatic * gain control (AGC) and voice activity detection (VAD). * @{ @@ -48,7 +48,7 @@ #ifdef __cplusplus extern "C" { #endif - + /** State of the preprocessor (one per channel). Should never be accessed directly. */ struct SpeexPreprocessState_; @@ -64,12 +64,12 @@ typedef struct SpeexPreprocessState_ SpeexPreprocessState; */ SpeexPreprocessState *speex_preprocess_state_init(int frame_size, int sampling_rate); -/** Destroys a preprocessor state +/** Destroys a preprocessor state * @param st Preprocessor state to destroy */ void speex_preprocess_state_destroy(SpeexPreprocessState *st); -/** Preprocess a frame +/** Preprocess a frame * @param st Preprocessor state * @param x Audio sample vector (in and out). Must be same size as specified in speex_preprocess_state_init(). * @return Bool value for voice activity (1 for speech, 0 for noise/silence), ONLY if VAD turned on. @@ -85,7 +85,7 @@ int speex_preprocess(SpeexPreprocessState *st, spx_int16_t *x, spx_int32_t *echo */ void speex_preprocess_estimate_update(SpeexPreprocessState *st, spx_int16_t *x); -/** Used like the ioctl function to control the preprocessor parameters +/** Used like the ioctl function to control the preprocessor parameters * @param st Preprocessor state * @param request ioctl-type request (one of the SPEEX_PREPROCESS_* macros) * @param ptr Data exchanged to-from function diff --git a/thirdparties/mac/include/speex/speex_resampler.h b/thirdparties/mac/include/speex/speex_resampler.h index 54eef8d..4aefa61 100755 --- a/thirdparties/mac/include/speex/speex_resampler.h +++ b/thirdparties/mac/include/speex/speex_resampler.h @@ -1,8 +1,8 @@ /* Copyright (C) 2007 Jean-Marc Valin - + File: speex_resampler.h Resampling code - + The design goals of this code are: - Very fast algorithm - Low memory requirement @@ -43,7 +43,7 @@ /********* WARNING: MENTAL SANITY ENDS HERE *************/ -/* If the resampler is defined outside of Speex, we change the symbol names so that +/* If the resampler is defined outside of Speex, we change the symbol names so that there won't be any clash if linking with Speex later on. */ /* #define RANDOM_PREFIX your software name here */ @@ -53,7 +53,7 @@ #define CAT_PREFIX2(a,b) a ## b #define CAT_PREFIX(a,b) CAT_PREFIX2(a, b) - + #define speex_resampler_init CAT_PREFIX(RANDOM_PREFIX,_resampler_init) #define speex_resampler_init_frac CAT_PREFIX(RANDOM_PREFIX,_resampler_init_frac) #define speex_resampler_destroy CAT_PREFIX(RANDOM_PREFIX,_resampler_destroy) @@ -81,7 +81,7 @@ #define spx_int32_t int #define spx_uint16_t unsigned short #define spx_uint32_t unsigned int - + #else /* OUTSIDE_SPEEX */ #include "speex/speex_types.h" @@ -99,13 +99,13 @@ extern "C" { #define SPEEX_RESAMPLER_QUALITY_DESKTOP 5 enum { - RESAMPLER_ERR_SUCCESS = 0, - RESAMPLER_ERR_ALLOC_FAILED = 1, - RESAMPLER_ERR_BAD_STATE = 2, - RESAMPLER_ERR_INVALID_ARG = 3, - RESAMPLER_ERR_PTR_OVERLAP = 4, - - RESAMPLER_ERR_MAX_ERROR + RESAMPLER_ERR_SUCCESS = 0, + RESAMPLER_ERR_ALLOC_FAILED = 1, + RESAMPLER_ERR_BAD_STATE = 2, + RESAMPLER_ERR_INVALID_ARG = 3, + RESAMPLER_ERR_PTR_OVERLAP = 4, + + RESAMPLER_ERR_MAX_ERROR }; struct SpeexResamplerState_; @@ -120,14 +120,14 @@ typedef struct SpeexResamplerState_ SpeexResamplerState; * @return Newly created resampler state * @retval NULL Error: not enough memory */ -SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels, - spx_uint32_t in_rate, - spx_uint32_t out_rate, - int quality, - int *err); - -/** Create a new resampler with fractional input/output rates. The sampling - * rate ratio is an arbitrary rational number with both the numerator and +SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels, + spx_uint32_t in_rate, + spx_uint32_t out_rate, + int quality, + int *err); + +/** Create a new resampler with fractional input/output rates. The sampling + * rate ratio is an arbitrary rational number with both the numerator and * denominator being 32-bit integers. * @param nb_channels Number of channels to be processed * @param ratio_num Numerator of the sampling rate ratio @@ -139,13 +139,13 @@ SpeexResamplerState *speex_resampler_init(spx_uint32_t nb_channels, * @return Newly created resampler state * @retval NULL Error: not enough memory */ -SpeexResamplerState *speex_resampler_init_frac(spx_uint32_t nb_channels, - spx_uint32_t ratio_num, - spx_uint32_t ratio_den, - spx_uint32_t in_rate, - spx_uint32_t out_rate, - int quality, - int *err); +SpeexResamplerState *speex_resampler_init_frac(spx_uint32_t nb_channels, + spx_uint32_t ratio_num, + spx_uint32_t ratio_den, + spx_uint32_t in_rate, + spx_uint32_t out_rate, + int quality, + int *err); /** Destroy a resampler state. * @param st Resampler state @@ -154,24 +154,24 @@ void speex_resampler_destroy(SpeexResamplerState *st); /** Resample a float array. The input and output buffers must *not* overlap. * @param st Resampler state - * @param channel_index Index of the channel to process for the multi-channel + * @param channel_index Index of the channel to process for the multi-channel * base (0 otherwise) * @param in Input buffer - * @param in_len Number of input samples in the input buffer. Returns the + * @param in_len Number of input samples in the input buffer. Returns the * number of samples processed * @param out Output buffer * @param out_len Size of the output buffer. Returns the number of samples written */ -int speex_resampler_process_float(SpeexResamplerState *st, - spx_uint32_t channel_index, - const float *in, - spx_uint32_t *in_len, - float *out, - spx_uint32_t *out_len); +int speex_resampler_process_float(SpeexResamplerState *st, + spx_uint32_t channel_index, + const float *in, + spx_uint32_t *in_len, + float *out, + spx_uint32_t *out_len); /** Resample an int array. The input and output buffers must *not* overlap. * @param st Resampler state - * @param channel_index Index of the channel to process for the multi-channel + * @param channel_index Index of the channel to process for the multi-channel * base (0 otherwise) * @param in Input buffer * @param in_len Number of input samples in the input buffer. Returns the number @@ -179,12 +179,12 @@ int speex_resampler_process_float(SpeexResamplerState *st, * @param out Output buffer * @param out_len Size of the output buffer. Returns the number of samples written */ -int speex_resampler_process_int(SpeexResamplerState *st, - spx_uint32_t channel_index, - const spx_int16_t *in, - spx_uint32_t *in_len, - spx_int16_t *out, - spx_uint32_t *out_len); +int speex_resampler_process_int(SpeexResamplerState *st, + spx_uint32_t channel_index, + const spx_int16_t *in, + spx_uint32_t *in_len, + spx_int16_t *out, + spx_uint32_t *out_len); /** Resample an interleaved float array. The input and output buffers must *not* overlap. * @param st Resampler state @@ -195,11 +195,11 @@ int speex_resampler_process_int(SpeexResamplerState *st, * @param out_len Size of the output buffer. Returns the number of samples written. * This is all per-channel. */ -int speex_resampler_process_interleaved_float(SpeexResamplerState *st, - const float *in, - spx_uint32_t *in_len, - float *out, - spx_uint32_t *out_len); +int speex_resampler_process_interleaved_float(SpeexResamplerState *st, + const float *in, + spx_uint32_t *in_len, + float *out, + spx_uint32_t *out_len); /** Resample an interleaved int array. The input and output buffers must *not* overlap. * @param st Resampler state @@ -210,31 +210,31 @@ int speex_resampler_process_interleaved_float(SpeexResamplerState *st, * @param out_len Size of the output buffer. Returns the number of samples written. * This is all per-channel. */ -int speex_resampler_process_interleaved_int(SpeexResamplerState *st, - const spx_int16_t *in, - spx_uint32_t *in_len, - spx_int16_t *out, - spx_uint32_t *out_len); +int speex_resampler_process_interleaved_int(SpeexResamplerState *st, + const spx_int16_t *in, + spx_uint32_t *in_len, + spx_int16_t *out, + spx_uint32_t *out_len); /** Set (change) the input/output sampling rates (integer value). * @param st Resampler state * @param in_rate Input sampling rate (integer number of Hz). * @param out_rate Output sampling rate (integer number of Hz). */ -int speex_resampler_set_rate(SpeexResamplerState *st, - spx_uint32_t in_rate, - spx_uint32_t out_rate); +int speex_resampler_set_rate(SpeexResamplerState *st, + spx_uint32_t in_rate, + spx_uint32_t out_rate); /** Get the current input/output sampling rates (integer value). * @param st Resampler state * @param in_rate Input sampling rate (integer number of Hz) copied. * @param out_rate Output sampling rate (integer number of Hz) copied. */ -void speex_resampler_get_rate(SpeexResamplerState *st, - spx_uint32_t *in_rate, +void speex_resampler_get_rate(SpeexResamplerState *st, + spx_uint32_t *in_rate, spx_uint32_t *out_rate); -/** Set (change) the input/output sampling rates and resampling ratio +/** Set (change) the input/output sampling rates and resampling ratio * (fractional values in Hz supported). * @param st Resampler state * @param ratio_num Numerator of the sampling rate ratio @@ -242,11 +242,11 @@ void speex_resampler_get_rate(SpeexResamplerState *st, * @param in_rate Input sampling rate rounded to the nearest integer (in Hz). * @param out_rate Output sampling rate rounded to the nearest integer (in Hz). */ -int speex_resampler_set_rate_frac(SpeexResamplerState *st, - spx_uint32_t ratio_num, - spx_uint32_t ratio_den, - spx_uint32_t in_rate, - spx_uint32_t out_rate); +int speex_resampler_set_rate_frac(SpeexResamplerState *st, + spx_uint32_t ratio_num, + spx_uint32_t ratio_den, + spx_uint32_t in_rate, + spx_uint32_t out_rate); /** Get the current resampling ratio. This will be reduced to the least * common denominator. @@ -254,53 +254,53 @@ int speex_resampler_set_rate_frac(SpeexResamplerState *st, * @param ratio_num Numerator of the sampling rate ratio copied * @param ratio_den Denominator of the sampling rate ratio copied */ -void speex_resampler_get_ratio(SpeexResamplerState *st, - spx_uint32_t *ratio_num, +void speex_resampler_get_ratio(SpeexResamplerState *st, + spx_uint32_t *ratio_num, spx_uint32_t *ratio_den); /** Set (change) the conversion quality. * @param st Resampler state - * @param quality Resampling quality between 0 and 10, where 0 has poor + * @param quality Resampling quality between 0 and 10, where 0 has poor * quality and 10 has very high quality. */ -int speex_resampler_set_quality(SpeexResamplerState *st, - int quality); +int speex_resampler_set_quality(SpeexResamplerState *st, + int quality); /** Get the conversion quality. * @param st Resampler state - * @param quality Resampling quality between 0 and 10, where 0 has poor + * @param quality Resampling quality between 0 and 10, where 0 has poor * quality and 10 has very high quality. */ -void speex_resampler_get_quality(SpeexResamplerState *st, +void speex_resampler_get_quality(SpeexResamplerState *st, int *quality); /** Set (change) the input stride. * @param st Resampler state * @param stride Input stride */ -void speex_resampler_set_input_stride(SpeexResamplerState *st, +void speex_resampler_set_input_stride(SpeexResamplerState *st, spx_uint32_t stride); /** Get the input stride. * @param st Resampler state * @param stride Input stride copied */ -void speex_resampler_get_input_stride(SpeexResamplerState *st, +void speex_resampler_get_input_stride(SpeexResamplerState *st, spx_uint32_t *stride); /** Set (change) the output stride. * @param st Resampler state * @param stride Output stride */ -void speex_resampler_set_output_stride(SpeexResamplerState *st, - spx_uint32_t stride); +void speex_resampler_set_output_stride(SpeexResamplerState *st, + spx_uint32_t stride); /** Get the output stride. * @param st Resampler state copied * @param stride Output stride */ -void speex_resampler_get_output_stride(SpeexResamplerState *st, - spx_uint32_t *stride); +void speex_resampler_get_output_stride(SpeexResamplerState *st, + spx_uint32_t *stride); /** Get the latency in input samples introduced by the resampler. * @param st Resampler state @@ -312,8 +312,8 @@ int speex_resampler_get_input_latency(SpeexResamplerState *st); */ int speex_resampler_get_output_latency(SpeexResamplerState *st); -/** Make sure that the first samples to go out of the resamplers don't have - * leading zeros. This is only useful before starting to use a newly created +/** Make sure that the first samples to go out of the resamplers don't have + * leading zeros. This is only useful before starting to use a newly created * resampler. It is recommended to use that when resampling an audio file, as * it will generate a file with the same length. For real-time processing, * it is probably easier not to use this call (so that the output duration diff --git a/thirdparties/mac/include/speex/speex_stereo.h b/thirdparties/mac/include/speex/speex_stereo.h index a259713..f33704d 100755 --- a/thirdparties/mac/include/speex/speex_stereo.h +++ b/thirdparties/mac/include/speex/speex_stereo.h @@ -7,18 +7,18 @@ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + - Neither the name of the Xiph.org Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -48,12 +48,12 @@ extern "C" { /** If you access any of these fields directly, I'll personally come and bite you */ typedef struct SpeexStereoState { - float balance; /**< Left/right balance info */ - float e_ratio; /**< Ratio of energies: E(left+right)/[E(left)+E(right)] */ - float smooth_left; /**< Smoothed left channel gain */ - float smooth_right; /**< Smoothed right channel gain */ - float reserved1; /**< Reserved for future use */ - float reserved2; /**< Reserved for future use */ + float balance; /**< Left/right balance info */ + float e_ratio; /**< Ratio of energies: E(left+right)/[E(left)+E(right)] */ + float smooth_left; /**< Smoothed left channel gain */ + float smooth_right; /**< Smoothed right channel gain */ + float reserved1; /**< Reserved for future use */ + float reserved2; /**< Reserved for future use */ } SpeexStereoState; /** Deprecated. Use speex_stereo_state_init() instead. */ diff --git a/thirdparties/mac/include/speex/speex_types.h b/thirdparties/mac/include/speex/speex_types.h index 852fed8..fa8f806 100755 --- a/thirdparties/mac/include/speex/speex_types.h +++ b/thirdparties/mac/include/speex/speex_types.h @@ -22,100 +22,100 @@ #ifndef _SPEEX_TYPES_H #define _SPEEX_TYPES_H -#if defined(_WIN32) +#if defined(_WIN32) # if defined(__CYGWIN__) # include <_G_config.h> - typedef _G_int32_t spx_int32_t; - typedef _G_uint32_t spx_uint32_t; - typedef _G_int16_t spx_int16_t; - typedef _G_uint16_t spx_uint16_t; +typedef _G_int32_t spx_int32_t; +typedef _G_uint32_t spx_uint32_t; +typedef _G_int16_t spx_int16_t; +typedef _G_uint16_t spx_uint16_t; # elif defined(__MINGW32__) - typedef short spx_int16_t; - typedef unsigned short spx_uint16_t; - typedef int spx_int32_t; - typedef unsigned int spx_uint32_t; +typedef short spx_int16_t; +typedef unsigned short spx_uint16_t; +typedef int spx_int32_t; +typedef unsigned int spx_uint32_t; # elif defined(__MWERKS__) - typedef int spx_int32_t; - typedef unsigned int spx_uint32_t; - typedef short spx_int16_t; - typedef unsigned short spx_uint16_t; +typedef int spx_int32_t; +typedef unsigned int spx_uint32_t; +typedef short spx_int16_t; +typedef unsigned short spx_uint16_t; # else - /* MSVC/Borland */ - typedef __int32 spx_int32_t; - typedef unsigned __int32 spx_uint32_t; - typedef __int16 spx_int16_t; - typedef unsigned __int16 spx_uint16_t; +/* MSVC/Borland */ +typedef __int32 spx_int32_t; +typedef unsigned __int32 spx_uint32_t; +typedef __int16 spx_int16_t; +typedef unsigned __int16 spx_uint16_t; # endif #elif defined(__MACOS__) # include - typedef SInt16 spx_int16_t; - typedef UInt16 spx_uint16_t; - typedef SInt32 spx_int32_t; - typedef UInt32 spx_uint32_t; +typedef SInt16 spx_int16_t; +typedef UInt16 spx_uint16_t; +typedef SInt32 spx_int32_t; +typedef UInt32 spx_uint32_t; #elif (defined(__APPLE__) && defined(__MACH__)) /* MacOS X Framework build */ # include - typedef int16_t spx_int16_t; - typedef u_int16_t spx_uint16_t; - typedef int32_t spx_int32_t; - typedef u_int32_t spx_uint32_t; +typedef int16_t spx_int16_t; +typedef u_int16_t spx_uint16_t; +typedef int32_t spx_int32_t; +typedef u_int32_t spx_uint32_t; #elif defined(__BEOS__) - /* Be */ +/* Be */ # include - typedef int16_t spx_int16_t; - typedef u_int16_t spx_uint16_t; - typedef int32_t spx_int32_t; - typedef u_int32_t spx_uint32_t; +typedef int16_t spx_int16_t; +typedef u_int16_t spx_uint16_t; +typedef int32_t spx_int32_t; +typedef u_int32_t spx_uint32_t; #elif defined (__EMX__) - /* OS/2 GCC */ - typedef short spx_int16_t; - typedef unsigned short spx_uint16_t; - typedef int spx_int32_t; - typedef unsigned int spx_uint32_t; +/* OS/2 GCC */ +typedef short spx_int16_t; +typedef unsigned short spx_uint16_t; +typedef int spx_int32_t; +typedef unsigned int spx_uint32_t; #elif defined (DJGPP) - /* DJGPP */ - typedef short spx_int16_t; - typedef int spx_int32_t; - typedef unsigned int spx_uint32_t; +/* DJGPP */ +typedef short spx_int16_t; +typedef int spx_int32_t; +typedef unsigned int spx_uint32_t; #elif defined(R5900) - /* PS2 EE */ - typedef int spx_int32_t; - typedef unsigned spx_uint32_t; - typedef short spx_int16_t; +/* PS2 EE */ +typedef int spx_int32_t; +typedef unsigned spx_uint32_t; +typedef short spx_int16_t; #elif defined(__SYMBIAN32__) - /* Symbian GCC */ - typedef signed short spx_int16_t; - typedef unsigned short spx_uint16_t; - typedef signed int spx_int32_t; - typedef unsigned int spx_uint32_t; +/* Symbian GCC */ +typedef signed short spx_int16_t; +typedef unsigned short spx_uint16_t; +typedef signed int spx_int32_t; +typedef unsigned int spx_uint32_t; #elif defined(CONFIG_TI_C54X) || defined (CONFIG_TI_C55X) - typedef short spx_int16_t; - typedef unsigned short spx_uint16_t; - typedef long spx_int32_t; - typedef unsigned long spx_uint32_t; +typedef short spx_int16_t; +typedef unsigned short spx_uint16_t; +typedef long spx_int32_t; +typedef unsigned long spx_uint32_t; #elif defined(CONFIG_TI_C6X) - typedef short spx_int16_t; - typedef unsigned short spx_uint16_t; - typedef int spx_int32_t; - typedef unsigned int spx_uint32_t; +typedef short spx_int16_t; +typedef unsigned short spx_uint16_t; +typedef int spx_int32_t; +typedef unsigned int spx_uint32_t; #else -- cgit v1.1