Changeset 285756 in webkit
- Timestamp:
- Nov 12, 2021, 3:54:38 PM (5 years ago)
- Location:
- branches/safari-612.3.6.1-branch/Source/WebKit
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/SpeechRecognitionRemoteRealtimeMediaSource.cpp (modified) (1 diff)
-
WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-612.3.6.1-branch/Source/WebKit/ChangeLog
r285693 r285756 1 2021-11-12 Russell Epstein <repstein@apple.com> 2 3 Revert r285690. rdar://problem/83381842 4 1 5 2021-11-11 Alan Coon <alancoon@apple.com> 2 6 -
branches/safari-612.3.6.1-branch/Source/WebKit/UIProcess/SpeechRecognitionRemoteRealtimeMediaSource.cpp
r285690 r285756 78 78 void SpeechRecognitionRemoteRealtimeMediaSource::setStorage(const SharedMemory::Handle& handle, const WebCore::CAAudioStreamDescription& description, uint64_t numberOfFrames) 79 79 { 80 if (!numberOfFrames) { 81 m_ringBuffer = nullptr; 82 m_buffer = nullptr; 83 return; 84 } 80 m_description = description; 85 81 86 m_description = description;87 82 m_ringBuffer = WebCore::CARingBuffer::adoptStorage(makeUniqueRef<ReadOnlySharedRingBufferStorage>(handle), description, numberOfFrames).moveToUniquePtr(); 88 83 m_buffer = makeUnique<WebCore::WebAudioBufferList>(description); -
branches/safari-612.3.6.1-branch/Source/WebKit/WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.cpp
r285690 r285756 64 64 , m_connection(WTFMove(connection)) 65 65 #if PLATFORM(COCOA) 66 , m_ringBuffer(makeUniqueRef<SharedRingBufferStorage>(std::bind(&Source::storageChanged, this, std::placeholders::_1 , std::placeholders::_2, std::placeholders::_3)))66 , m_ringBuffer(makeUniqueRef<SharedRingBufferStorage>(std::bind(&Source::storageChanged, this, std::placeholders::_1))) 67 67 #endif 68 68 { … … 114 114 ASSERT(description.platformDescription().type == PlatformDescription::CAAudioStreamBasicType); 115 115 m_description = *WTF::get<const AudioStreamBasicDescription*>(description.platformDescription().description); 116 m_ringBuffer.allocate(m_description.streamDescription(), m_description.sampleRate() * 2); 116 117 m_numberOfFrames = m_description.sampleRate() * 2; 118 m_ringBuffer.allocate(m_description.streamDescription(), m_numberOfFrames); 117 119 } 118 120 … … 130 132 #if PLATFORM(COCOA) 131 133 132 void storageChanged(SharedMemory* storage , const WebCore::CAAudioStreamDescription& description, size_t numberOfFrames)134 void storageChanged(SharedMemory* storage) 133 135 { 134 136 DisableMallocRestrictionsForCurrentThreadScope scope; … … 141 143 uint64_t dataSize = 0; 142 144 #endif 143 m_connection->send(Messages::SpeechRecognitionRemoteRealtimeMediaSourceManager::SetStorage(m_identifier, SharedMemory::IPCHandle { WTFMove(handle), dataSize }, description,numberOfFrames), 0);145 m_connection->send(Messages::SpeechRecognitionRemoteRealtimeMediaSourceManager::SetStorage(m_identifier, SharedMemory::IPCHandle { WTFMove(handle), dataSize }, m_description, m_numberOfFrames), 0); 144 146 } 145 147 … … 161 163 162 164 #if PLATFORM(COCOA) 165 uint64_t m_numberOfFrames { 0 }; 163 166 CARingBuffer m_ringBuffer; 164 167 CAAudioStreamDescription m_description { };
Note:
See TracChangeset
for help on using the changeset viewer.