FreeBSD Bugzilla – Attachment 206112 Details for
Bug 238869
www/chromium: sndio input implementation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
chromium-sndio.diff
chromium-sndio.diff (text/plain), 2.13 KB, created by
Tobias Kortkamp
on 2019-07-28 11:01:13 UTC
(
hide
)
Description:
chromium-sndio.diff
Filename:
MIME Type:
Creator:
Tobias Kortkamp
Created:
2019-07-28 11:01:13 UTC
Size:
2.13 KB
patch
obsolete
>Index: www/chromium/Makefile >=================================================================== >--- www/chromium/Makefile (revision 507349) >+++ www/chromium/Makefile (working copy) >@@ -3,6 +3,7 @@ > > PORTNAME= chromium > PORTVERSION= 75.0.3770.142 >+PORTREVISION= 1 > CATEGORIES?= www > MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \ > LOCAL/cpm/chromium/:fonts >Index: www/chromium/files/sndio_input.cc >=================================================================== >--- www/chromium/files/sndio_input.cc (revision 507349) >+++ www/chromium/files/sndio_input.cc (working copy) >@@ -188,7 +188,7 @@ > > // convert frames count to TimeDelta > const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay, >- params.sample_rate() * 1000); >+ params.sample_rate()); > > // push into bus > audio_bus->FromInterleaved(buffer, nframes, SampleFormatToBytesPerChannel(kSampleFormat)); >Index: www/chromium/files/sndio_output.cc >=================================================================== >--- www/chromium/files/sndio_output.cc (revision 507349) >+++ www/chromium/files/sndio_output.cc (working copy) >@@ -140,7 +140,7 @@ > } > > void SndioAudioOutputStream::ThreadLoop(void) { >- int avail, count; >+ int avail, count, result; > > while (state == kRunning) { > // Update volume if needed >@@ -152,7 +152,8 @@ > pthread_mutex_unlock(&mutex); > > // Get data to play >- const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay, params.sample_rate() * 1000); >+ const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay, >+ params.sample_rate()); > count = source->OnMoreData(delay, base::TimeTicks::Now(), 0, audio_bus.get()); > audio_bus->ToInterleaved(count, SampleFormatToBytesPerChannel(kSampleFormat), buffer); > if (count == 0) { >@@ -164,8 +165,8 @@ > > // Submit data to the device > avail = count * params.GetBytesPerFrame(kSampleFormat); >- count = sio_write(hdl, buffer, avail); >- if (count == 0) { >+ result = sio_write(hdl, buffer, avail); >+ if (result == 0) { > LOG(WARNING) << "Audio device disconnected."; > break; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 238869
:
205403
| 206112