mirror of
https://github.com/openharmony/drivers_peripheral.git
synced 2026-08-24 18:15:56 -04:00
not writeframe is not streaming
Signed-off-by: smartbao <baomin@huawei.com>
This commit is contained in:
@@ -29,7 +29,7 @@ using namespace bluetooth;
|
||||
|
||||
sptr<IBluetoothA2dpSrc> g_proxy_ = nullptr;
|
||||
static sptr<BluetoothA2dpSrcObserver> g_btA2dpSrcObserverCallbacks = nullptr;
|
||||
int g_playState = false;
|
||||
int g_playState = A2DP_NOT_PLAYING;
|
||||
RawAddress g_device;
|
||||
|
||||
static void AudioOnConnectionStateChanged(const RawAddress &device, int state)
|
||||
@@ -148,6 +148,10 @@ int WriteFrame(const uint8_t *data, uint32_t size)
|
||||
HDF_LOGE("audio_bluetooth_manager %{public}s: g_proxy_ is null", __func__);
|
||||
return RET_BAD_STATUS;
|
||||
}
|
||||
if (g_playState == A2DP_NOT_PLAYING) {
|
||||
HDF_LOGE("audio_bluetooth_manager %{public}s: playState is not Streaming", __func__);
|
||||
return RET_BAD_STATUS;
|
||||
}
|
||||
return g_proxy_->WriteFrame(data, size);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user