Skip to content
Permalink
Browse files

TextToSpeech_macx: selectively conform to NSSpeechSynthesizerDelegate…

… protocol.

MUSpeechSynthesizerPrivateHelper currently conforms to the
NSSpeechSynthesizerDelegate protocol, which was an informal
protocol prior to 10.6.

Our legacy universal builds currently use the ancient 10.5 SDK
and does not know of the NSSpeechSynthesizerDelegate protocol,
which was first introduced in the 10.6 SDK. Because of that, the
legacy universal build is currently broken.

To fix it, we change the code to only adhere to
NSSpeechSynthesizerDelegate via a class extension. This class
extension is only exposed to non-universal builds using the 10.6
SDK (or greater).
  • Loading branch information...
mkrautz committed Jan 25, 2014
1 parent 3e0112d commit 1bd57bd0a56c6eed4c7cf3fd477ca575c178f307
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/mumble/TextToSpeech_macx.mm
@@ -38,7 +38,7 @@
#include "Global.h"
#include "TextToSpeech.h"

@interface MUSpeechSynthesizerPrivateHelper : NSObject <NSSpeechSynthesizerDelegate> {
@interface MUSpeechSynthesizerPrivateHelper : NSObject {
NSMutableArray *m_messages;
NSSpeechSynthesizer *m_synthesizer;
}
@@ -47,6 +47,11 @@ - (void)appendMessage:(NSString *)message;
- (void)processSpeech;
@end

#if !defined(USE_MAC_UNIVERSAL) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
@interface MUSpeechSynthesizerPrivateHelper () <NSSpeechSynthesizerDelegate>
@end
#endif

@implementation MUSpeechSynthesizerPrivateHelper

- (id)init {

0 comments on commit 1bd57bd

Please sign in to comment.
You can’t perform that action at this time.