diff options
author | Kangho Hur <kangho.hur@samsung.com> | 2012-02-20 21:24:22 +0900 |
---|---|---|
committer | Kangho Hur <kangho.hur@samsung.com> | 2012-02-21 10:18:03 +0900 |
commit | 4bc8e9e3dc97c2f981975c79542f56aa830721f5 (patch) | |
tree | b4eec1aa5414b35ec810e33c77c43a2387ee02ec | |
parent | 475284bd3bfa2ca171e0a70f69c891b339216c75 (diff) | |
download | audio-io-4bc8e9e3dc97c2f981975c79542f56aa830721f5.tar.gz audio-io-4bc8e9e3dc97c2f981975c79542f56aa830721f5.tar.bz2 audio-io-4bc8e9e3dc97c2f981975c79542f56aa830721f5.zip |
Use 'static' to local function which is limited to the current source file.
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | src/audio_io.c | 20 |
2 files changed, 16 insertions, 10 deletions
diff --git a/debian/changelog b/debian/changelog index fad8284..d1f7c84 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +capi-media-audio-io (0.1.0-6) unstable; urgency=low + + * Use 'static' to local function which is limited to the current source file. + + -- Kangho Hur <kangho.hur@samsung.com> Tue, 21 Feb 2012 10:17:37 +0900 + capi-media-audio-io (0.1.0-5) unstable; urgency=low * Apply the SOVERSION diff --git a/src/audio_io.c b/src/audio_io.c index 743d798..8b09340 100644 --- a/src/audio_io.c +++ b/src/audio_io.c @@ -40,7 +40,7 @@ /* * Internal Implementation */ -int _convert_error_code(int code, char *func_name) +static int __convert_error_code(int code, char *func_name) { int ret = AUDIO_IO_ERROR_NONE; char* msg="AUDIO_IO_ERROR_NONE"; @@ -81,7 +81,7 @@ int _convert_error_code(int code, char *func_name) return ret; } -int _check_parameter(int sample_rate, audio_channel_e channel, audio_sample_type_e type) +static int __check_parameter(int sample_rate, audio_channel_e channel, audio_sample_type_e type) { if(sample_rate<8000 || sample_rate > 44100) { @@ -107,7 +107,7 @@ int _check_parameter(int sample_rate, audio_channel_e channel, audio_sample_type int audio_in_create(int sample_rate, audio_channel_e channel, audio_sample_type_e type , audio_in_h* input) { AUDIO_IO_NULL_ARG_CHECK(input); - if(_check_parameter(sample_rate, channel, type)!=AUDIO_IO_ERROR_NONE) + if(__check_parameter(sample_rate, channel, type)!=AUDIO_IO_ERROR_NONE) return AUDIO_IO_ERROR_INVALID_PARAMETER; audio_in_s * handle; @@ -122,7 +122,7 @@ int audio_in_create(int sample_rate, audio_channel_e channel, audio_sample_type_ int ret = mm_sound_pcm_capture_open( &handle->mm_handle,sample_rate, channel, type); if( ret < 0) { - return _convert_error_code(ret, (char*)__FUNCTION__); + return __convert_error_code(ret, (char*)__FUNCTION__); } else { @@ -142,7 +142,7 @@ int audio_in_destroy(audio_in_h input) int ret = mm_sound_pcm_capture_close(handle->mm_handle); if (ret != MM_ERROR_NONE) { - return _convert_error_code(ret, (char*)__FUNCTION__); + return __convert_error_code(ret, (char*)__FUNCTION__); } else { @@ -160,7 +160,7 @@ int audio_in_read(audio_in_h input, void *buffer, unsigned int length ) ret = mm_sound_pcm_capture_read(handle->mm_handle, (void*) buffer, length); if(ret <0) { - return _convert_error_code(ret, (char*)__FUNCTION__); + return __convert_error_code(ret, (char*)__FUNCTION__); } else { @@ -209,7 +209,7 @@ int audio_in_get_sample_type(audio_in_h input, audio_sample_type_e *type) int audio_out_create(int sample_rate, audio_channel_e channel, audio_sample_type_e type, sound_type_e sound_type, audio_out_h* output) { AUDIO_IO_NULL_ARG_CHECK(output); - if(_check_parameter(sample_rate, channel, type)!=AUDIO_IO_ERROR_NONE) + if(__check_parameter(sample_rate, channel, type)!=AUDIO_IO_ERROR_NONE) return AUDIO_IO_ERROR_INVALID_PARAMETER; if(sound_type < SOUND_TYPE_SYSTEM || sound_type > SOUND_TYPE_CALL) { @@ -229,7 +229,7 @@ int audio_out_create(int sample_rate, audio_channel_e channel, audio_sample_type int ret = mm_sound_pcm_play_open(&handle->mm_handle,sample_rate, channel, type, sound_type); if( ret < 0) { - return _convert_error_code(ret, (char*)__FUNCTION__); + return __convert_error_code(ret, (char*)__FUNCTION__); } else { @@ -250,7 +250,7 @@ int audio_out_destroy(audio_out_h output) int ret = mm_sound_pcm_play_close(handle->mm_handle); if (ret != MM_ERROR_NONE) { - return _convert_error_code(ret, (char*)__FUNCTION__); + return __convert_error_code(ret, (char*)__FUNCTION__); } else { @@ -269,7 +269,7 @@ int audio_out_write(audio_out_h output, void* buffer, unsigned int length) ret = mm_sound_pcm_play_write(handle->mm_handle, (void*) buffer, length); if(ret <0) { - return _convert_error_code(ret, (char*)__FUNCTION__); + return __convert_error_code(ret, (char*)__FUNCTION__); } else { |