diff --git a/src/libultra/voice/voicecleardictionary.c b/src/libultra/voice/voicecleardictionary.c index 719c7f0dc..bb93a2302 100644 --- a/src/libultra/voice/voicecleardictionary.c +++ b/src/libultra/voice/voicecleardictionary.c @@ -2,11 +2,11 @@ /** * Initializes Voice Recognition System word registration dictionary. - * + * * The dictionary is initialized so that the specified "numWords" can be * registered in the dictionary. 1-255 words can be registered in the dictionary. - * - * Words cannot be registered with the osVoiceSetWord before the dictionary + * + * Words cannot be registered with the osVoiceSetWord before the dictionary * is initialized with the osVoiceClearDictionary function */ s32 osVoiceClearDictionary(OSVoiceHandle* hd, u8 numWords) { diff --git a/src/libultra/voice/voicecontread2.c b/src/libultra/voice/voicecontread2.c index ce52e2be0..d0056a0ab 100644 --- a/src/libultra/voice/voicecontread2.c +++ b/src/libultra/voice/voicecontread2.c @@ -35,7 +35,7 @@ s32 __osVoiceContRead2(OSMesgQueue* mq, s32 port, u16 arg2, u8 dst[2]) { ptr[4] = arg2 >> 3; ptr[5] = __osContAddressCrc(arg2) | (arg2 << 5); - + __osSiRawStartDma(OS_WRITE, &__osPfsPifRam); osRecvMesg(mq, NULL, OS_MESG_BLOCK); __osSiRawStartDma(OS_READ, &__osPfsPifRam); @@ -64,4 +64,3 @@ s32 __osVoiceContRead2(OSMesgQueue* mq, s32 port, u16 arg2, u8 dst[2]) { return errorCode; } - diff --git a/src/libultra/voice/voicecontread36.c b/src/libultra/voice/voicecontread36.c index 66067d239..f11e20d26 100644 --- a/src/libultra/voice/voicecontread36.c +++ b/src/libultra/voice/voicecontread36.c @@ -35,7 +35,7 @@ s32 __osVoiceContRead36(OSMesgQueue* mq, s32 port, u16 arg2, u8 dst[36]) { ptr[4] = arg2 >> 3; ptr[5] = __osContAddressCrc(arg2) | (arg2 << 5); - + __osSiRawStartDma(OS_WRITE, &__osPfsPifRam); osRecvMesg(mq, NULL, OS_MESG_BLOCK); __osSiRawStartDma(OS_READ, &__osPfsPifRam); diff --git a/src/libultra/voice/voicecontrolgain.c b/src/libultra/voice/voicecontrolgain.c index eb896bb72..1f2e73aac 100644 --- a/src/libultra/voice/voicecontrolgain.c +++ b/src/libultra/voice/voicecontrolgain.c @@ -7,7 +7,6 @@ s32 osVoiceControlGain(OSVoiceHandle* hd, s32 analog, s32 digital) { s32 errorCode; u8 phi_a2; - if (analog == 0) { phi_a2 = 0x18; } else { @@ -18,22 +17,22 @@ s32 osVoiceControlGain(OSVoiceHandle* hd, s32 analog, s32 digital) { if (errorCode != 0) { return errorCode; } - - if (!((digital < 8) && (digital >= 0))){ + + if (!((digital < 8) && (digital >= 0))) { goto dummy; } phi_a2 = D_80098180[digital] + 2; if (0) { - dummy: + dummy: return CONT_ERR_INVALID; } errorCode = __osVoiceSetADConverter(hd->mq, hd->port, phi_a2); if (errorCode != 0) { return errorCode; - } + } return errorCode; } diff --git a/src/libultra/voice/voicecontwrite20.c b/src/libultra/voice/voicecontwrite20.c index 9eba371c6..2d43c9f26 100644 --- a/src/libultra/voice/voicecontwrite20.c +++ b/src/libultra/voice/voicecontwrite20.c @@ -38,7 +38,7 @@ s32 __osVoiceContWrite20(OSMesgQueue* mq, s32 port, u16 arg2, u8 dst[20]) { ptr[5] = __osContAddressCrc(arg2) | (arg2 << 5); bcopy(dst, &ptr[6], 20); - + __osSiRawStartDma(OS_WRITE, &__osPfsPifRam); temp_s2 = __osVoiceContDataCrc(dst, 20); osRecvMesg(mq, NULL, OS_MESG_BLOCK); diff --git a/src/libultra/voice/voicecontwrite4.c b/src/libultra/voice/voicecontwrite4.c index 8e1af6bd8..eac29d27c 100644 --- a/src/libultra/voice/voicecontwrite4.c +++ b/src/libultra/voice/voicecontwrite4.c @@ -38,7 +38,7 @@ s32 __osVoiceContWrite4(OSMesgQueue* mq, s32 port, u16 arg2, u8 dst[4]) { ptr[5] = __osContAddressCrc(arg2) | (arg2 << 5); bcopy(dst, &ptr[6], 4); - + __osSiRawStartDma(OS_WRITE, &__osPfsPifRam); temp_s2 = __osVoiceContDataCrc(dst, 4); osRecvMesg(mq, NULL, OS_MESG_BLOCK); diff --git a/src/libultra/voice/voicegetstatus.c b/src/libultra/voice/voicegetstatus.c index e11dcb954..b305cad19 100644 --- a/src/libultra/voice/voicegetstatus.c +++ b/src/libultra/voice/voicegetstatus.c @@ -54,6 +54,6 @@ s32 __osVoiceGetStatus(OSMesgQueue* mq, s32 port, u8* status) { } while ((errorCode == CONT_ERR_CONTRFAIL) && (retryCount-- >= 0)); __osSiRelAccess(); - + return errorCode; } diff --git a/src/libultra/voice/voiceinit.c b/src/libultra/voice/voiceinit.c index 0cd5aba2b..6936070d5 100644 --- a/src/libultra/voice/voiceinit.c +++ b/src/libultra/voice/voiceinit.c @@ -17,7 +17,7 @@ s32 osVoiceInit(OSMesgQueue* siMessageQ, OSVoiceHandle* hd, s32 channel) { hd->port = channel; hd->mq = siMessageQ; hd->mode = 0; - + errorCode = __osVoiceGetStatus(siMessageQ, channel, &status); if (errorCode != 0) { return errorCode; @@ -55,14 +55,13 @@ s32 osVoiceInit(OSMesgQueue* siMessageQ, OSVoiceHandle* hd, s32 channel) { if (errorCode != 0) { return errorCode; } - + errorCode = __osVoiceCheckResult(hd, &status); if (errorCode & 0xFF00) { errorCode = CONT_ERR_INVALID; } - + return errorCode; } } } - diff --git a/src/libultra/voice/voicemaskdictionary.c b/src/libultra/voice/voicemaskdictionary.c index 21c01b8a5..e0e67c792 100644 --- a/src/libultra/voice/voicemaskdictionary.c +++ b/src/libultra/voice/voicemaskdictionary.c @@ -29,7 +29,7 @@ s32 osVoiceMaskDictionary(OSVoiceHandle* hd, u8* maskPattern, s32 size) { for (i = 0; i < sp3C; i += 2) { data[i + 20 - sp3C] = maskPattern[i]; - data[i + 21 - sp3C] = maskPattern[i+1]; + data[i + 21 - sp3C] = maskPattern[i + 1]; } if (size & 1) { @@ -46,4 +46,3 @@ s32 osVoiceMaskDictionary(OSVoiceHandle* hd, u8* maskPattern, s32 size) { return errorCode; } - diff --git a/src/libultra/voice/voicesetadconverter.c b/src/libultra/voice/voicesetadconverter.c index fdfe49ecf..4dccec20f 100644 --- a/src/libultra/voice/voicesetadconverter.c +++ b/src/libultra/voice/voicesetadconverter.c @@ -37,7 +37,7 @@ s32 __osVoiceSetADConverter(OSMesgQueue* mq, s32 port, u8 arg2) { ptr[3] = arg2; ptr[4] = __osContAddressCrc(sp48); - + __osSiRawStartDma(OS_WRITE, &__osPfsPifRam); osRecvMesg(mq, NULL, OS_MESG_BLOCK); __osSiRawStartDma(OS_READ, &__osPfsPifRam); diff --git a/src/libultra/voice/voicesetword.c b/src/libultra/voice/voicesetword.c index a5ef50348..377d80a47 100644 --- a/src/libultra/voice/voicesetword.c +++ b/src/libultra/voice/voicesetword.c @@ -37,7 +37,7 @@ s32 osVoiceSetWord(OSVoiceHandle* hd, u8* word) { if (errorCode != 0) { return errorCode; } - } + } errorCode = __osVoiceContWrite20(hd->mq, hd->port, 0, &data[20]); if (errorCode != 0) { diff --git a/src/libultra/voice/voicestartreaddata.c b/src/libultra/voice/voicestartreaddata.c index e3f6854bf..927edf223 100644 --- a/src/libultra/voice/voicestartreaddata.c +++ b/src/libultra/voice/voicestartreaddata.c @@ -33,7 +33,7 @@ s32 osVoiceStartReadData(OSVoiceHandle* hd) { if (errorCode == 0) { errorCode = __osVoiceCheckResult(hd, &status); - + if (errorCode & 0xFF00) { errorCode = CONT_ERR_INVALID; } else { diff --git a/src/libultra/voice/voicestopread.c b/src/libultra/voice/voicestopread.c index 8254c0083..0b126622c 100644 --- a/src/libultra/voice/voicestopread.c +++ b/src/libultra/voice/voicestopread.c @@ -31,7 +31,7 @@ s32 osVoiceStopReadData(OSVoiceHandle* hd) { */ u.data32 = 0x700; errorCode = __osVoiceContWrite4(hd->mq, hd->port, 0, u.data); - + if (errorCode == 0) { i = 0; do {