From e50f9e00550715c7bd1e26e5a83bb4adf3ca4484 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Thu, 2 May 2013 10:44:31 +0100 Subject: [PATCH] DEFAULT_SAMPLE_RATE is not needed, so remove it. The sampleRate variable gets overwritten with the actual sample rate during creation from the espeak_Initialize method, so the value it is set to in the constructor does not matter. --- android/jni/jni/eSpeakService.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/android/jni/jni/eSpeakService.cpp b/android/jni/jni/eSpeakService.cpp index cad9a2cf..f34ada54 100644 --- a/android/jni/jni/eSpeakService.cpp +++ b/android/jni/jni/eSpeakService.cpp @@ -1,6 +1,6 @@ /* - * Copyright (C) 2011 Google Inc. * Copyright (C) 2012-2013 Reece H. Dunn + * Copyright (C) 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,7 +51,6 @@ enum synthesis_result { SYNTH_ABORT = 1 }; -const int DEFAULT_SAMPLE_RATE = 22050; const int DEFAULT_CHANNEL_COUNT = CHANNEL_COUNT_MONO; const int DEFAULT_AUDIO_FORMAT = ENCODING_PCM_16BIT; const int DEFAULT_BUFFER_SIZE = 1000; @@ -67,7 +66,7 @@ struct native_data_t { native_data_t() { env = NULL; object = NULL; - sampleRate = DEFAULT_SAMPLE_RATE; + sampleRate = 0; channelCount = DEFAULT_CHANNEL_COUNT; audioFormat = DEFAULT_AUDIO_FORMAT; bufferSizeInMillis = DEFAULT_BUFFER_SIZE;