Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Aug 2019 17:43:35 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r508754 - head/www/chromium/files
Message-ID:  <201908121743.x7CHhZAe022143@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Mon Aug 12 17:43:35 2019
New Revision: 508754
URL: https://svnweb.freebsd.org/changeset/ports/508754

Log:
  www/chromium: Sync sndio backend with OpenBSD and unbreak build after r508722
  
  ../../media/audio/openbsd/audio_manager_openbsd.cc:158:14: error: allocating an object of abstract class type 'media::SndioAudioOutputStream'
    return new SndioAudioOutputStream(params, this);
               ^
  ../../media/audio/audio_io.h:117:16: note: unimplemented pure virtual method 'Flush' in 'SndioAudioOutputStream'
    virtual void Flush() = 0;
  
  PR:		239802
  Submitted by:	tobik
  Reported by:	kib
  Tested by:	kib
  Approved by:	chromium (cpm)
  MFH:		2019Q3 (together with r508722)

Modified:
  head/www/chromium/files/sndio_output.cc
  head/www/chromium/files/sndio_output.h

Modified: head/www/chromium/files/sndio_output.cc
==============================================================================
--- head/www/chromium/files/sndio_output.cc	Mon Aug 12 17:28:39 2019	(r508753)
+++ head/www/chromium/files/sndio_output.cc	Mon Aug 12 17:43:35 2019	(r508754)
@@ -58,7 +58,7 @@ bool SndioAudioOutputStream::Open() {
   sio_initpar(&par);
   par.rate = params.sample_rate();
   par.pchan = params.channels();
-  par.bits = SampleFormatToBitsPerChannel(kSampleFormat);
+  par.bits = SampleFormatToBitsPerChannel(kSampleFormat); 
   par.bps = par.bits / 8;
   par.sig = sig = par.bits != 8 ? 1 : 0;
   par.le = SIO_LE_NATIVE;
@@ -139,6 +139,10 @@ void SndioAudioOutputStream::GetVolume(double* v) {
   pthread_mutex_unlock(&mutex);
 }
 
+// This stream is always used with sub second buffer sizes, where it's
+// sufficient to simply always flush upon Start().
+void SndioAudioOutputStream::Flush() {}
+
 void SndioAudioOutputStream::ThreadLoop(void) {
   int avail, count, result;
 
@@ -153,7 +157,7 @@ void SndioAudioOutputStream::ThreadLoop(void) {
 
     // Get data to play
     const base::TimeDelta delay = AudioTimestampHelper::FramesToTime(hw_delay,
-        params.sample_rate());
+	params.sample_rate());
     count = source->OnMoreData(delay, base::TimeTicks::Now(), 0, audio_bus.get());
     audio_bus->ToInterleaved(count, SampleFormatToBytesPerChannel(kSampleFormat), buffer);
     if (count == 0) {

Modified: head/www/chromium/files/sndio_output.h
==============================================================================
--- head/www/chromium/files/sndio_output.h	Mon Aug 12 17:28:39 2019	(r508753)
+++ head/www/chromium/files/sndio_output.h	Mon Aug 12 17:43:35 2019	(r508754)
@@ -31,6 +31,7 @@ class SndioAudioOutputStream : public AudioOutputStrea
   void Stop() override;
   void SetVolume(double volume) override;
   void GetVolume(double* volume) override;
+  void Flush() override;
 
   friend void sndio_onmove(void *arg, int delta);
   friend void sndio_onvol(void *arg, unsigned int vol);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908121743.x7CHhZAe022143>