Created
April 8, 2017 17:35
-
-
Save FiniteReality/dd0310b6a4d0beb103053389af674412 to your computer and use it in GitHub Desktop.
libopus and libsodium stubs for Discord.Net
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MIT License | |
Copyright (c) FiniteReality 2017+ | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all | |
copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
SOFTWARE. | |
*/ | |
#include <stdint> | |
int crypto_secretbox_easy(uint8_t* output, uint8_t* input, int64_t input_length, uint8_t* nonce, uint8_t* secret) | |
{ | |
(void)output; (void)input; (void)input_length; (void)nonce; (void)secret; | |
return 0; | |
} | |
int crypto_secretbox_open_easy(uint8_t* output, uint8_t* input, int64_t input_length, uint8_t* nonce, uint8_t* secret) | |
{ | |
(void)output; (void)input; (void)input_length; (void)nonce; (void)secret; | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MIT License | |
Copyright (c) FiniteReality 2017+ | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all | |
copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
SOFTWARE. | |
*/ | |
#include <stdint> | |
void* opus_encoder_create(int fs, int channels, int application, int error) | |
{ | |
(void)fs; (void)channels; (void)application; (void)error; | |
return NULL; | |
} | |
void* opus_decoder_create(int fs, int channels, int error) | |
{ | |
(void)fs; (void)channels; (void)error; | |
return NULL; | |
} | |
void opus_encoder_destroy(void* encoder) | |
{ | |
(void)encoder; | |
} | |
void opus_decoder_destroy(void* encoder) | |
{ | |
(void)encoder; | |
} | |
int opus_encode(void* st, uint8_t* pcm, int frame_size, uint8_t* data, int max_data_bytes) | |
{ | |
(void)st; (void)pcm; (void)frame_size; (void)data; (void)max_data_bytes; | |
return 0; | |
} | |
int opus_decode(void* st, uint8_t* data, int len, uint8_t* pcm, int max_frame_size, int decode_fec) | |
{ | |
(void)st; (void)data; (void)len; (void)data; (void)max_frame_size; (void)decode_fec; | |
return 0; | |
} | |
int opus_encoder_ctl(void* st, int request, int value) | |
{ | |
(void)st; (void)request; (void)value; | |
return 0; | |
} | |
int opus_decoder_ctl(void* st, int request, int value) | |
{ | |
(void)st; (void)request; (void)value; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment