diff options
author | Rene Ladan <rene@FreeBSD.org> | 2021-01-02 12:28:34 +0000 |
---|---|---|
committer | Rene Ladan <rene@FreeBSD.org> | 2021-01-02 12:28:34 +0000 |
commit | 58083a596736902f0b7c0eaf4c9affda7d7edbb5 (patch) | |
tree | b79332244517c33996a0893e38498ffc48c36dda /www/iridium/files/sndio_input.h | |
parent | multimedia/gtk-youtube-viewer: update 3.8.0 -> 3.8.1 (diff) |
Remove a few expired ports depending on Python 2.7:
2020-12-31 www/iridium: Uses Python 2.7 which is EOLed upstream
2020-12-31 editors/atom: Uses Python 2.7 which is EOLed upstream
2020-12-31 devel/electron4: Uses Python 2.7 which is EOLed upstream
2020-12-31 devel/electron5: Uses Python 2.7 which is EOLed upstream
2020-12-31 devel/electron6: Uses Python 2.7 which is EOLed upstream
Notes
Notes:
svn path=/head/; revision=559931
Diffstat (limited to 'www/iridium/files/sndio_input.h')
-rw-r--r-- | www/iridium/files/sndio_input.h | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/www/iridium/files/sndio_input.h b/www/iridium/files/sndio_input.h deleted file mode 100644 index d868e0469db5..000000000000 --- a/www/iridium/files/sndio_input.h +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_ -#define MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_ - -#include <stdint.h> -#include <string> -#include <sndio.h> - -#include "base/compiler_specific.h" -#include "base/macros.h" -#include "base/memory/weak_ptr.h" -#include "base/time/time.h" -#include "media/audio/agc_audio_stream.h" -#include "media/audio/audio_io.h" -#include "media/audio/audio_device_description.h" -#include "media/base/audio_parameters.h" - -namespace media { - -class AudioManagerBase; - -// Implementation of AudioOutputStream using sndio(7) -class SndioAudioInputStream : public AgcAudioStream<AudioInputStream> { - public: - // Pass this to the constructor if you want to attempt auto-selection - // of the audio recording device. - static const char kAutoSelectDevice[]; - - // Create a PCM Output stream for the SNDIO device identified by - // |device_name|. If unsure of what to use for |device_name|, use - // |kAutoSelectDevice|. - SndioAudioInputStream(AudioManagerBase* audio_manager, - const std::string& device_name, - const AudioParameters& params); - - ~SndioAudioInputStream() override; - - // Implementation of AudioInputStream. - bool Open() override; - void Start(AudioInputCallback* callback) override; - void Stop() override; - void Close() override; - double GetMaxVolume() override; - void SetVolume(double volume) override; - double GetVolume() override; - bool IsMuted() override; - void SetOutputDeviceForAec(const std::string& output_device_id) override; - - private: - - enum StreamState { - kClosed, // Not opened yet - kStopped, // Device opened, but not started yet - kRunning, // Started, device playing - kStopWait // Stopping, waiting for the real-time thread to exit - }; - - // C-style call-backs - static void OnMoveCallback(void *arg, int delta); - static void* ThreadEntry(void *arg); - - // Continuously moves data from the device to the consumer - void ThreadLoop(); - // Our creator, the audio manager needs to be notified when we close. - AudioManagerBase* manager; - // Parameters of the source - AudioParameters params; - // We store data here for consumer - std::unique_ptr<AudioBus> audio_bus; - // Call-back that consumes recorded data - AudioInputCallback* callback; // Valid during a recording session. - // Handle of the audio device - struct sio_hdl* hdl; - // Current state of the stream - enum StreamState state; - // High priority thread running ThreadLoop() - pthread_t thread; - // Number of frames buffered in the hardware - int hw_delay; - // Temporary buffer where data is stored sndio-compatible format - char* buffer; - - DISALLOW_COPY_AND_ASSIGN(SndioAudioInputStream); -}; - -} // namespace media - -#endif // MEDIA_AUDIO_SNDIO_SNDIO_INPUT_H_ |