diff --git a/README.md b/README.md index c0716ac3..89673434 100644 --- a/README.md +++ b/README.md @@ -177,12 +177,12 @@ You can use APIs provided in this repository to convert audio data into audible bytesWritten += retBytes; } ``` -9. Incase of audio interrupts, application can encounter write failures. Interrupt unaware applications can check the renderer state using **GetStatus** API before writing audio data further. +9. In case of audio interrupts, application can encounter write failures. Interrupt unaware applications can check the renderer state using **GetStatus** API before writing audio data further. Interrupt aware applications will have more details accessible via AudioRendererCallback.. ``` while ((bytesWritten < bytesToWrite) && ((bytesToWrite - bytesWritten) > minBytes)) { int32_t retBytes = audioRenderer->Write(buffer.get() + bytesWritten, bytesToWrite - bytesWritten); - if (retBytes < 0) { // Error occured + if (retBytes < 0) { // Error occurred if (audioRenderer_->GetStatus() == RENDERER_PAUSED) { // Query the state and take appropriate action isRenderPaused_ = true; int32_t seekPos = bytesWritten - bytesToWrite; @@ -349,7 +349,7 @@ You can use the APIs provided in [**audio_system_manager.h**](https://gitee.com/ bool isDevActive = audioSystemMgr->IsDeviceActive(deviceType); ``` -9. Use **SetDeviceChangeCallback** API to register for device change events. Clients will recieve callback when a device is connected/disconnected. Currently audio subsystem supports sending device change events for WIRED_HEADSET, USB_HEADSET and BLUETOOTH_A2DP device. +9. Use **SetDeviceChangeCallback** API to register for device change events. Clients will receive callback when a device is connected/disconnected. Currently audio subsystem supports sending device change events for WIRED_HEADSET, USB_HEADSET and BLUETOOTH_A2DP device. **OnDeviceChange** function will be called and client will receive **DeviceChangeAction** object, which will contain following parameters:\ *type* : **DeviceChangeType** which specifies whether device is connected or disconnected.\ *deviceDescriptors* : Array of **AudioDeviceDescriptor** object which specifies the type of device and its role(input/output device). diff --git a/README_zh.md b/README_zh.md index 0152ac8f..27994755 100644 --- a/README_zh.md +++ b/README_zh.md @@ -159,7 +159,7 @@ PCM(Pulse Code Modulation),即脉冲编码调制,是一种将模拟信 if (bytesRead < 0) { break; } else if (bytesRead > 0) { - fwrite(buffer, size, bytesRead, recFile); // example shows writes the recored data into a file + fwrite(buffer, size, bytesRead, recFile); // example shows writes the recorded data into a file numBuffersToCapture--; } } diff --git a/frameworks/js/napi/audio_renderer/src/audio_renderer_napi.cpp b/frameworks/js/napi/audio_renderer/src/audio_renderer_napi.cpp index a177d020..eb7c8e4a 100644 --- a/frameworks/js/napi/audio_renderer/src/audio_renderer_napi.cpp +++ b/frameworks/js/napi/audio_renderer/src/audio_renderer_napi.cpp @@ -643,7 +643,7 @@ void AudioRendererNapi::PauseAsyncCallbackComplete(napi_env env, napi_status sta napi_delete_reference(env, asyncContext->callbackRef); } napi_delete_async_work(env, asyncContext->work); - // Pause failed . Contine Write + // Pause failed . Continue Write if (!asyncContext->isTrue) { HiLog::Info(LABEL, "PauseAsyncCallbackComplete: Pasue failed, Continue Write"); if (!asyncContext->objectInfo->writeRequestQ_.empty()) { diff --git a/frameworks/native/audioadapter/include/audio_service_adapter.h b/frameworks/native/audioadapter/include/audio_service_adapter.h index 1fb8f804..8a9c43ba 100644 --- a/frameworks/native/audioadapter/include/audio_service_adapter.h +++ b/frameworks/native/audioadapter/include/audio_service_adapter.h @@ -43,7 +43,7 @@ public: class AudioServiceAdapter { public: /** - * @brief creater audioserviceadapter instance + * @brief create audioserviceadapter instance * * @param cb callback reference for AudioServiceAdapterCallback class * @return Returns instance of class that extends AudioServiceAdapter diff --git a/frameworks/native/audiorenderer/src/audio_renderer_sink.cpp b/frameworks/native/audiorenderer/src/audio_renderer_sink.cpp index dbe399ec..90c0632f 100644 --- a/frameworks/native/audiorenderer/src/audio_renderer_sink.cpp +++ b/frameworks/native/audiorenderer/src/audio_renderer_sink.cpp @@ -745,7 +745,7 @@ int32_t AudioRendererSinkGetTransactionId(uint64_t *transactionId) } if (!transactionId) { - AUDIO_ERR_LOG("AudioRendererSinkGetTransactionId failed transacion id null"); + AUDIO_ERR_LOG("AudioRendererSinkGetTransactionId failed transaction id null"); return ERR_INVALID_PARAM; } diff --git a/frameworks/native/audiorenderer/src/bluetooth_renderer_sink.cpp b/frameworks/native/audiorenderer/src/bluetooth_renderer_sink.cpp index 7283b260..b1816f65 100644 --- a/frameworks/native/audiorenderer/src/bluetooth_renderer_sink.cpp +++ b/frameworks/native/audiorenderer/src/bluetooth_renderer_sink.cpp @@ -265,7 +265,7 @@ int32_t BluetoothRendererSink::Init(const BluetoothSinkAttr &attr) } if (CreateRender(audioPort) != 0) { - AUDIO_ERR_LOG("Create render faied"); + AUDIO_ERR_LOG("Create render failed"); return ERR_NOT_STARTED; } @@ -649,7 +649,7 @@ int32_t BluetoothRendererSinkGetTransactionId(uint64_t *transactionId) } if (!transactionId) { - AUDIO_ERR_LOG("BluetoothRendererSinkGetTransactionId failed transacion id null"); + AUDIO_ERR_LOG("BluetoothRendererSinkGetTransactionId failed transaction id null"); return ERR_INVALID_PARAM; } diff --git a/interfaces/inner_api/native/audiomanager/include/audio_system_manager.h b/interfaces/inner_api/native/audiomanager/include/audio_system_manager.h index 9aa5c8c2..14acd919 100644 --- a/interfaces/inner_api/native/audiomanager/include/audio_system_manager.h +++ b/interfaces/inner_api/native/audiomanager/include/audio_system_manager.h @@ -57,7 +57,7 @@ struct DeviceChangeAction { }; // AudioManagerCallback OnInterrupt is added to handle compilation error in call manager -// Once call manager adapt to new interrupt APIs, this will be rmeoved +// Once call manager adapt to new interrupt APIs, this will be removed class AudioManagerCallback { public: virtual ~AudioManagerCallback() = default; @@ -234,7 +234,7 @@ public: int32_t UnregisterVolumeKeyEventCallback(const int32_t clientPid); // Below APIs are added to handle compilation error in call manager - // Once call manager adapt to new interrupt APIs, this will be rmeoved + // Once call manager adapt to new interrupt APIs, this will be removed int32_t SetAudioManagerCallback(const AudioSystemManager::AudioVolumeType streamType, const std::shared_ptr &callback); int32_t UnsetAudioManagerCallback(const AudioSystemManager::AudioVolumeType streamType) const; diff --git a/interfaces/inner_api/native/audiorenderer/include/audio_renderer.h b/interfaces/inner_api/native/audiorenderer/include/audio_renderer.h index 0b432350..8c3805d8 100644 --- a/interfaces/inner_api/native/audiorenderer/include/audio_renderer.h +++ b/interfaces/inner_api/native/audiorenderer/include/audio_renderer.h @@ -101,7 +101,7 @@ public: class AudioRenderer { public: /** - * @brief creater renderer instance. + * @brief create renderer instance. * * @param audioStreamType The audio streamtype to be created. * refer AudioStreamType in audio_info.h. @@ -120,7 +120,7 @@ public: static std::unique_ptr Create(AudioStreamType audioStreamType, const AppInfo &appInfo); /** - * @brief creater renderer instance. + * @brief create renderer instance. * * @param rendererOptions The audio renderer configuration to be used while creating renderer instance. * refer AudioRendererOptions in audio_info.h. @@ -129,7 +129,7 @@ public: static std::unique_ptr Create(const AudioRendererOptions &rendererOptions); /** - * @brief creater renderer instance. + * @brief create renderer instance. * * @param rendererOptions The audio renderer configuration to be used while creating renderer instance. * refer AudioRendererOptions in audio_info.h. @@ -174,9 +174,9 @@ public: /** * @brief Registers the renderer callback listener. * (1)If using old SetParams(const AudioCapturerParams params) API, - * this API must be called immediatley after SetParams. + * this API must be called immediately after SetParams. * (2) Else if using Create(const AudioRendererOptions &rendererOptions), - * this API must be called immediatley after Create. + * this API must be called immediately after Create. * * @return Returns {@link SUCCESS} if callback registration is successful; returns an error code * defined in {@link audio_errors.h} otherwise. @@ -306,7 +306,7 @@ public: * @brief Obtains a reasonable minimum buffer size for rendering, however, the renderer can * accept other write sizes as well. * - * @param bufferSize Indicates the reference variable into which buffer size value wil be written. + * @param bufferSize Indicates the reference variable into which buffer size value will be written. * @return Returns {@link SUCCESS} if bufferSize is successfully obtained; returns an error code * defined in {@link audio_errors.h} otherwise. */ diff --git a/interfaces/inner_api/native/audioringtone/include/iringtone_player.h b/interfaces/inner_api/native/audioringtone/include/iringtone_player.h index 23d16ced..15909699 100644 --- a/interfaces/inner_api/native/audioringtone/include/iringtone_player.h +++ b/interfaces/inner_api/native/audioringtone/include/iringtone_player.h @@ -60,7 +60,7 @@ public: * @param volume Configures the volume at which the ringtone has to be played * @param loop Boolean parameter indicating whether to enable or disable looping * @return Returns {@link MSERR_OK} if the looping parameter is set successfully to player; - * retuns an error code defined in {@link media_errors.h} otherwise. + * returns an error code defined in {@link media_errors.h} otherwise. * @since 1.0 * @version 1.0 */ @@ -70,7 +70,7 @@ public: * @brief Start playing ringtone * * @return Returns {@link MSERR_OK} if the looping parameter is set successfully to player; - * retuns an error code defined in {@link media_errors.h} otherwise. + * returns an error code defined in {@link media_errors.h} otherwise. * @since 1.0 * @version 1.0 */ @@ -80,7 +80,7 @@ public: * @brief Stop playing ringtone * * @return Returns {@link MSERR_OK} if the looping parameter is set successfully to player; - * retuns an error code defined in {@link media_errors.h} otherwise. + * returns an error code defined in {@link media_errors.h} otherwise. * @since 1.0 * @version 1.0 */ @@ -90,7 +90,7 @@ public: * @brief Returns the audio contetnt type and stream uage details to the clients * * @return Returns {@link MSERR_OK} if the looping parameter is set successfully to player; - * retuns an error code defined in {@link media_errors.h} otherwise. + * returns an error code defined in {@link media_errors.h} otherwise. * @since 1.0 * @version 1.0 */ @@ -100,7 +100,7 @@ public: * @brief Returns the title of the uri set. * * @return Returns title as string if the title is obtained successfully from media library. - * retuns an empty string otherwise. + * returns an empty string otherwise. * @since 1.0 * @version 1.0 */ @@ -110,7 +110,7 @@ public: * @brief Releases the ringtone client resources * * @return Returns {@link MSERR_OK} if the looping parameter is set successfully to player; - * retuns an error code defined in {@link media_errors.h} otherwise. + * returns an error code defined in {@link media_errors.h} otherwise. * @since 1.0 * @version 1.0 */ diff --git a/interfaces/kits/js/@ohos.multimedia.audio.d.ts b/interfaces/kits/js/@ohos.multimedia.audio.d.ts index d1063848..b2b7f82c 100644 --- a/interfaces/kits/js/@ohos.multimedia.audio.d.ts +++ b/interfaces/kits/js/@ohos.multimedia.audio.d.ts @@ -803,7 +803,7 @@ declare namespace audio { */ enum StreamUsage { /** - * Unkown usage. + * Unknown usage. * @since 8 */ STREAM_USAGE_UNKNOWN = 0, diff --git a/interfaces/kits/js/audio_manager/@ohos.multimedia.audio.d.ts b/interfaces/kits/js/audio_manager/@ohos.multimedia.audio.d.ts index b30da33d..900b21ff 100644 --- a/interfaces/kits/js/audio_manager/@ohos.multimedia.audio.d.ts +++ b/interfaces/kits/js/audio_manager/@ohos.multimedia.audio.d.ts @@ -353,7 +353,7 @@ declare namespace audio { */ enum StreamUsage { /** - * Unkown usage. + * Unknown usage. * @since 7 */ STREAM_USAGE_UNKNOWN = 0, @@ -1591,8 +1591,8 @@ declare namespace audio { /** * Sets the ringtone uri. * @param context Indicates the Context object on OHOS - * @param uri Indicated which uri to be set for the tone type - * @param type Indicats the type of the tone + * @param uri Indicates which uri to be set for the tone type + * @param type Indicates the type of the tone * @param callback Callback object to be passed along with request * @since 1.0 * @version 1.0 @@ -1602,7 +1602,7 @@ declare namespace audio { /** * Sets the ringtone uri. * @param context Indicates the Context object on OHOS - * @param type Indicats the type of the tone + * @param type Indicates the type of the tone * @param callback Callback object to be passed along with request * @return Returns uri of the ringtone * @since 1.0 @@ -1613,7 +1613,7 @@ declare namespace audio { /** * Gets the ringtone player. * @param context Indicates the Context object on OHOS - * @param type Indicats the type of the tone + * @param type Indicates the type of the tone * @param callback Callback object to be passed along with request * @return Returns ringtone player object * @since 1.0 @@ -1624,7 +1624,7 @@ declare namespace audio { /** * Sets the notification uri. * @param context Indicates the Context object on OHOS - * @param uri Indicats the uri of the notification + * @param uri Indicates the uri of the notification * @param callback Callback object to be passed along with request * @since 1.0 * @version 1.0 @@ -1644,7 +1644,7 @@ declare namespace audio { /** * Sets the alarm uri. * @param context Indicates the Context object on OHOS - * @param uri Indicats the uri of the alarm + * @param uri Indicates the uri of the alarm * @param callback Callback object to be passed along with request * @since 1.0 * @version 1.0 diff --git a/services/include/audio_manager_base.h b/services/include/audio_manager_base.h index 62ac63f9..db85d792 100644 --- a/services/include/audio_manager_base.h +++ b/services/include/audio_manager_base.h @@ -44,7 +44,7 @@ public: * Sets Microphone Mute status. * * @param isMute Mute status true or false to be set. - * @return Returns 0 if success. Otherise returns Errocode defined in audio_errors.h. + * @return Returns 0 if success. Otherwise returns Errocode defined in audio_errors.h. */ virtual int32_t SetMicrophoneMute(bool isMute) = 0; @@ -60,7 +60,7 @@ public: * * @param audioScene Audio scene type. * @param activeDevice Currently active priority device - * @return Returns 0 if success. Otherise returns Errocode defined in audio_errors.h. + * @return Returns 0 if success. Otherwise returns Errocode defined in audio_errors.h. */ virtual int32_t SetAudioScene(AudioScene audioScene, DeviceType activeDevice) = 0; @@ -91,7 +91,7 @@ public: /** * Update the audio route after device is detected and route is decided * - * @return Returns 0 if success. Otherise returns Errocode defined in audio_errors.h. + * @return Returns 0 if success. Otherwise returns Errocode defined in audio_errors.h. */ virtual int32_t UpdateActiveDeviceRoute(DeviceType type, DeviceFlag flag) = 0; diff --git a/services/include/audio_service/client/audio_service_client.h b/services/include/audio_service/client/audio_service_client.h index ed4cb3b3..4f7869d7 100644 --- a/services/include/audio_service/client/audio_service_client.h +++ b/services/include/audio_service/client/audio_service_client.h @@ -493,7 +493,7 @@ public: /** * @brief Verifies the clients permsiion based on appTokenId * - * @return Retruns whether the authentication was success or not + * @return Returns whether the authentication was success or not */ bool VerifyClientPermission(const std::string &permissionName, uint32_t appTokenId); diff --git a/services/src/audio_policy/client/audio_policy_proxy.cpp b/services/src/audio_policy/client/audio_policy_proxy.cpp index 79f9c6e6..7f924d2b 100644 --- a/services/src/audio_policy/client/audio_policy_proxy.cpp +++ b/services/src/audio_policy/client/audio_policy_proxy.cpp @@ -765,7 +765,7 @@ int32_t AudioPolicyProxy::RegisterAudioRendererEventListener(const int32_t clien data.WriteRemoteObject(object); int32_t error = Remote() ->SendRequest(REGISTER_PLAYBACK_EVENT, data, reply, option); if (error != ERR_NONE) { - AUDIO_ERR_LOG("RegisterAudioRendererEventListener register playback event faild , error: %d", error); + AUDIO_ERR_LOG("RegisterAudioRendererEventListener register playback event failed , error: %d", error); return ERROR; } @@ -855,7 +855,7 @@ int32_t AudioPolicyProxy::RegisterAudioCapturerEventListener(const int32_t clien data.WriteRemoteObject(object); int32_t error = Remote() ->SendRequest(REGISTER_RECORDING_EVENT, data, reply, option); if (error != ERR_NONE) { - AUDIO_ERR_LOG("RegisterAudioCapturerEventListener recording event faild , error: %d", error); + AUDIO_ERR_LOG("RegisterAudioCapturerEventListener recording event failed , error: %d", error); return ERROR; } @@ -878,7 +878,7 @@ int32_t AudioPolicyProxy::UnregisterAudioCapturerEventListener(const int32_t cli data.WriteInt32(clientUID); int32_t error = Remote() ->SendRequest(UNREGISTER_RECORDING_EVENT, data, reply, option); if (error != ERR_NONE) { - AUDIO_ERR_LOG("UnregisterAudioCapturerEventListener recording event faild , error: %d", error); + AUDIO_ERR_LOG("UnregisterAudioCapturerEventListener recording event failed , error: %d", error); return ERROR; } diff --git a/services/src/audio_policy/server/audio_policy_server.cpp b/services/src/audio_policy/server/audio_policy_server.cpp index ec9de22a..888e0b01 100644 --- a/services/src/audio_policy/server/audio_policy_server.cpp +++ b/services/src/audio_policy/server/audio_policy_server.cpp @@ -889,7 +889,7 @@ int32_t AudioPolicyServer::DeactivateAudioInterrupt(const AudioInterrupt &audioI } if (curActiveOwnersList_.empty() && pendingOwnersList_.empty()) { - AUDIO_DEBUG_LOG("AudioPolicyServer: No ther session active or pending. Deactivate complete, return success"); + AUDIO_DEBUG_LOG("AudioPolicyServer: No other session active or pending. Deactivate complete, return success"); AUDIO_DEBUG_LOG("AudioPolicyServer: DeactivateAudioInterrupt start: print active and pending lists"); PrintOwnersLists(); return SUCCESS; diff --git a/services/src/audio_policy/server/audio_stream_collector.cpp b/services/src/audio_policy/server/audio_stream_collector.cpp index 0705459e..e4c1e770 100644 --- a/services/src/audio_policy/server/audio_stream_collector.cpp +++ b/services/src/audio_policy/server/audio_stream_collector.cpp @@ -44,7 +44,7 @@ int32_t AudioStreamCollector::RegisterAudioRendererEventListener(int32_t clientU AUDIO_INFO_LOG("AudioStreamCollector: RegisterAudioRendererEventListener client id %{public}d done", clientUID); CHECK_AND_RETURN_RET_LOG(object != nullptr, ERR_INVALID_PARAM, - "AudioStreamCollector:set renderer state change event listner object is nullptr"); + "AudioStreamCollector:set renderer state change event listener object is nullptr"); sptr listener = iface_cast(object); CHECK_AND_RETURN_RET_LOG(listener != nullptr, ERR_INVALID_PARAM, @@ -71,7 +71,7 @@ int32_t AudioStreamCollector::RegisterAudioCapturerEventListener(int32_t clientU AUDIO_INFO_LOG("AudioStreamCollector: RegisterAudioCapturerEventListener for client id %{public}d done", clientUID); CHECK_AND_RETURN_RET_LOG(object != nullptr, ERR_INVALID_PARAM, - "AudioStreamCollector:set capturer event listner object is nullptr"); + "AudioStreamCollector:set capturer event listener object is nullptr"); sptr listener = iface_cast(object); CHECK_AND_RETURN_RET_LOG(listener != nullptr, ERR_INVALID_PARAM, "AudioStreamCollector: capturer obj cast failed"); diff --git a/services/src/audio_policy/server/etc/audio_interrupt_policy_config.xml b/services/src/audio_policy/server/etc/audio_interrupt_policy_config.xml index cd3a18d4..3386fc28 100644 --- a/services/src/audio_policy/server/etc/audio_interrupt_policy_config.xml +++ b/services/src/audio_policy/server/etc/audio_interrupt_policy_config.xml @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. --> - + diff --git a/services/src/audio_policy/server/service/manager/audio_adapter_manager.cpp b/services/src/audio_policy/server/service/manager/audio_adapter_manager.cpp index 79f23709..3af4c3de 100644 --- a/services/src/audio_policy/server/service/manager/audio_adapter_manager.cpp +++ b/services/src/audio_policy/server/service/manager/audio_adapter_manager.cpp @@ -87,7 +87,7 @@ int32_t AudioAdapterManager::SetStreamVolume(AudioStreamType streamType, float v return ERR_OPERATION_FAILED; } - // Incase if KvStore didnot connect during bootup + // In case if KvStore didnot connect during bootup if (mAudioPolicyKvStore == nullptr) { bool isFirstBoot = false; InitAudioPolicyKvStore(isFirstBoot); @@ -207,7 +207,7 @@ int32_t AudioAdapterManager::SetRingerMode(AudioRingerMode ringerMode) { mRingerMode = ringerMode; - // Incase if KvStore didnot connect during bootup + // In case if KvStore didnot connect during bootup if (mAudioPolicyKvStore == nullptr) { bool isFirstBoot = false; InitAudioPolicyKvStore(isFirstBoot); diff --git a/services/src/audio_service/client/audio_service_client.cpp b/services/src/audio_service/client/audio_service_client.cpp index 55aacb66..2555059f 100644 --- a/services/src/audio_service/client/audio_service_client.cpp +++ b/services/src/audio_service/client/audio_service_client.cpp @@ -908,7 +908,7 @@ int32_t AudioServiceClient::CreateStream(AudioStreamParams audioParams, AudioStr pa_proplist_sets(propList, "stream.sessionID", std::to_string(pa_context_get_index(context)).c_str()); pa_proplist_sets(propList, "stream.startTime", streamStartTime.c_str()); - AUDIO_ERR_LOG("Creating stream fo channels %{public}d", audioParams.channels); + AUDIO_ERR_LOG("Creating stream of channels %{public}d", audioParams.channels); pa_channel_map map; if (audioParams.channels > CHANNEL_6) { pa_channel_map_init(&map); diff --git a/services/src/audio_service/client/audio_system_manager.cpp b/services/src/audio_service/client/audio_system_manager.cpp index 3a653795..dbe1d4d4 100644 --- a/services/src/audio_service/client/audio_system_manager.cpp +++ b/services/src/audio_service/client/audio_system_manager.cpp @@ -674,7 +674,7 @@ bool AudioSystemManager::RequestIndependentInterrupt(FocusType focusType) audioInterrupt.streamType = AudioStreamType::STREAM_RECORDING; audioInterrupt.sessionID = clientID; int32_t result = AudioSystemManager::GetInstance()->RequestAudioFocus(audioInterrupt); - AUDIO_INFO_LOG("AudioSystemManager: requestIndependentInterrupt : reuslt -> %{public}d", result); + AUDIO_INFO_LOG("AudioSystemManager: requestIndependentInterrupt : result -> %{public}d", result); return (result == SUCCESS) ? true:false; } bool AudioSystemManager::AbandonIndependentInterrupt(FocusType focusType) @@ -687,7 +687,7 @@ bool AudioSystemManager::AbandonIndependentInterrupt(FocusType focusType) audioInterrupt.streamType = AudioStreamType::STREAM_RECORDING; audioInterrupt.sessionID = clientID; int32_t result = AudioSystemManager::GetInstance()->AbandonAudioFocus(audioInterrupt); - AUDIO_INFO_LOG("AudioSystemManager: abandonIndependentInterrupt : reuslt -> %{public}d", result); + AUDIO_INFO_LOG("AudioSystemManager: abandonIndependentInterrupt : result -> %{public}d", result); return (result == SUCCESS) ? true:false; } diff --git a/services/test/audio_capturer_test.cpp b/services/test/audio_capturer_test.cpp index 2e05c76d..a87984a2 100644 --- a/services/test/audio_capturer_test.cpp +++ b/services/test/audio_capturer_test.cpp @@ -153,7 +153,7 @@ public: } if (fwrite(buffer.get(), size, bytesRead, pFile) != bytesRead) { - AUDIO_ERR_LOG("error occured in fwrite"); + AUDIO_ERR_LOG("error occurred in fwrite"); } numBuffersToCapture--; if ((numBuffersToCapture == AudioTestConstants::PAUSE_BUFFER_POSITION) diff --git a/services/test/audio_multichannel_test.cpp b/services/test/audio_multichannel_test.cpp index ec897b18..9d4c9326 100644 --- a/services/test/audio_multichannel_test.cpp +++ b/services/test/audio_multichannel_test.cpp @@ -343,7 +343,7 @@ int main(int argc, char* argv[]) PrintUsage(); break; default: - cout << "Unsuported option. Exiting!!!" << endl; + cout << "Unsupported option. Exiting!!!" << endl; exit(0); break; } diff --git a/services/test/audio_voip_test.cpp b/services/test/audio_voip_test.cpp index adb33ccb..3a028d08 100644 --- a/services/test/audio_voip_test.cpp +++ b/services/test/audio_voip_test.cpp @@ -228,7 +228,7 @@ public: } if (fwrite(buffer.get(), size, bytesRead, pFile) != bytesRead) { - AUDIO_ERR_LOG("error occured in fwrite"); + AUDIO_ERR_LOG("error occurred in fwrite"); } numBuffersToCapture--; } diff --git a/services/test/interrupt_multi_renderer_test.cpp b/services/test/interrupt_multi_renderer_test.cpp index 9897b6fe..1a8de2f4 100644 --- a/services/test/interrupt_multi_renderer_test.cpp +++ b/services/test/interrupt_multi_renderer_test.cpp @@ -134,7 +134,7 @@ void InterruptMultiRendererTest::WriteBuffer(AudioRenderer* audioRenderer, FILE* int32_t retBytes = audioRenderer->Write(buffer.get() + bytesWritten, bytesToWrite - bytesWritten); if (retBytes < 0) { - AUDIO_ERR_LOG("InterruptMultiRendererTest: Error occured in writing buffer: %{public}d", retBytes); + AUDIO_ERR_LOG("InterruptMultiRendererTest: Error occurred in writing buffer: %{public}d", retBytes); if (audioRenderer->GetStatus() == RENDERER_PAUSED) { cb->isRendererPaused_ = true; int32_t seekPos = bytesWritten - bytesToWrite; diff --git a/services/test/pcm2wav.h b/services/test/pcm2wav.h index 988c5aa4..53b2a5c0 100644 --- a/services/test/pcm2wav.h +++ b/services/test/pcm2wav.h @@ -24,7 +24,7 @@ struct WAV_HEADER { uint8_t fmt[4] = {'f', 'm', 't', ' '}; // FMT header uint32_t Subchunk1Size = 16; // Size of the fmt chunk uint16_t AudioFormat = 1; // Audio format 1=PCM - uint16_t NumOfChan = 2; // Number of channels 1=Mono 2=Sterio + uint16_t NumOfChan = 2; // Number of channels 1=Mono 2=Stereo uint32_t SamplesPerSec = 44100; // Sampling Frequency in Hz uint32_t bytesPerSec = 176400; // bytes per second uint16_t blockAlign = 2; // 2=16-bit mono, 4=16-bit stereo diff --git a/test/unittest/manager_test/src/audio_manager_unit_test.cpp b/test/unittest/manager_test/src/audio_manager_unit_test.cpp index 7c95faf1..de47be5c 100644 --- a/test/unittest/manager_test/src/audio_manager_unit_test.cpp +++ b/test/unittest/manager_test/src/audio_manager_unit_test.cpp @@ -118,7 +118,7 @@ HWTEST(AudioManagerUnitTest, SetDeviceActive_004, TestSize.Level0) auto ret = AudioSystemManager::GetInstance()->SetDeviceActive(ActiveDeviceType::ACTIVE_DEVICE_TYPE_NONE, true); EXPECT_NE(SUCCESS, ret); - // On bootup sco wont be connected. Hence activation should fail + // On bootup sco won't be connected. Hence activation should fail ret = AudioSystemManager::GetInstance()->SetDeviceActive(ActiveDeviceType::BLUETOOTH_SCO, true); EXPECT_NE(SUCCESS, ret); diff --git a/test/unittest/stream_manager_test/src/audio_stream_manager_unit_test.cpp b/test/unittest/stream_manager_test/src/audio_stream_manager_unit_test.cpp index 7084a231..9468fac0 100644 --- a/test/unittest/stream_manager_test/src/audio_stream_manager_unit_test.cpp +++ b/test/unittest/stream_manager_test/src/audio_stream_manager_unit_test.cpp @@ -741,7 +741,7 @@ HWTEST(AudioStreamManagerUnitTest, Audio_Stream_Change_Listner_RendererStateChan g_audioManagerInstance->UnregisterAudioRendererEventListener(getpid()); } -// Capturer Listner Unit Cases +// Capturer Listener Unit Cases /** * @tc.name : Test RegisterAudioCapturerEventListener API * @tc.number: Audio_Stream_Change_Listner_RegisterAudioCapturerEventListener_001