| Index: ios/chrome/browser/ui/voice/text_to_speech_player.mm
|
| diff --git a/ios/chrome/browser/ui/voice/text_to_speech_player.mm b/ios/chrome/browser/ui/voice/text_to_speech_player.mm
|
| index 184b1b00350c3432a1b9b95a383c4b16d9dd1cd7..ade4fa44692f0eb1665856ffe2d608e385eecb39 100644
|
| --- a/ios/chrome/browser/ui/voice/text_to_speech_player.mm
|
| +++ b/ios/chrome/browser/ui/voice/text_to_speech_player.mm
|
| @@ -11,6 +11,10 @@
|
| #import "ios/chrome/browser/ui/voice/text_to_speech_player+subclassing.h"
|
| #import "ios/chrome/browser/ui/voice/voice_search_notification_names.h"
|
|
|
| +#if !defined(__has_feature) || !__has_feature(objc_arc)
|
| +#error "This file requires ARC support."
|
| +#endif
|
| +
|
| @interface TextToSpeechPlayer ()<AVAudioPlayerDelegate> {
|
| // The audio data to be played.
|
| base::scoped_nsobject<NSData> _audioData;
|
| @@ -44,7 +48,6 @@
|
| - (void)dealloc {
|
| [[NSNotificationCenter defaultCenter] removeObserver:self];
|
| [self cancelPlayback];
|
| - [super dealloc];
|
| }
|
|
|
| #pragma mark - Accessors
|
| @@ -66,7 +69,7 @@
|
| - (void)prepareToPlayAudioData:(NSData*)audioData {
|
| if (self.playingAudio)
|
| [self cancelPlayback];
|
| - _audioData.reset([audioData retain]);
|
| + _audioData.reset(audioData);
|
| [[NSNotificationCenter defaultCenter]
|
| postNotificationName:kTTSAudioReadyForPlaybackNotification
|
| object:self];
|
|
|