|
libpsynth 0.2.1
|
#include <caching_file_input.hpp>


Public Types | |
| typedef Range | range |
| typedef boost::pointee < InputPtr >::type | input_type |
| typedef input_type::range | input_range |
| typedef sound::buffer_from_range < input_range >::type | input_buffer_type |
| typedef sound::buffer_from_range < range >::type | buffer_type |
| typedef sound::ring_buffer < buffer_type > | ring_buffer_type |
Public Member Functions | |
| caching_file_input_impl (InputPtr input=0, std::size_t chunk_size=default_chunk_size, std::size_t buffer_size=default_buffer_size, std::size_t threshold=default_threshold) | |
| caching_file_input_impl (caching_file_input_impl &&other) | |
| ~caching_file_input_impl () | |
| void | start () |
| void | stop () |
| std::size_t | frame_rate () const |
| std::size_t | length () const |
| const input_type & | input () const |
| bool | is_backwards () const |
| void | set_backwards (bool backwards) |
| void | set_chunk_size (std::size_t cs) |
| void | soft_seek (std::size_t pos) |
| std::size_t | seek (std::ptrdiff_t pos, seek_dir dir) |
| std::size_t | take (const range &buf) |
| template<class Range2 > | |
| std::size_t | take (const Range2 &buf) |
| void | set_input (InputPtr ptr) |
| void | do_seek (std::ptrdiff_t offst, seek_dir dir) |
| void | run () |
Public Attributes | |
| std::size_t | _chunk_size |
| std::size_t | _buffer_size |
| std::size_t | _threshold |
| input_buffer_type | _tmp_buffer |
| ring_buffer_type | _buffer |
| ring_buffer_type::range & | _range |
| ring_buffer_type::position | _read_ptr |
| bool | _backwards |
| std::ptrdiff_t | _read_pos |
| std::ptrdiff_t | _new_read_pos |
| std::atomic< bool > | _finished |
| std::thread | _thread |
| std::mutex | _input_mutex |
| std::mutex | _buffer_mutex |
| std::condition_variable | _cond |
Static Public Attributes | |
| static constexpr std::size_t | default_chunk_size = 1024 |
| static constexpr std::size_t | default_buffer_size = 16384 |
| static constexpr std::size_t | default_threshold = 4096 |
Protected Attributes | |
| InputPtr | _input |
| typedef sound::buffer_from_range<range>::type psynth::io::detail::caching_file_input_impl< Range, InputPtr >::buffer_type |
| typedef sound::buffer_from_range<input_range>::type psynth::io::detail::caching_file_input_impl< Range, InputPtr >::input_buffer_type |
| typedef input_type::range psynth::io::detail::caching_file_input_impl< Range, InputPtr >::input_range |
| typedef boost::pointee<InputPtr>::type psynth::io::detail::caching_file_input_impl< Range, InputPtr >::input_type |
| typedef Range psynth::io::detail::caching_file_input_impl< Range, InputPtr >::range |
Reimplemented from psynth::io::input< Range >.
| typedef sound::ring_buffer<buffer_type> psynth::io::detail::caching_file_input_impl< Range, InputPtr >::ring_buffer_type |
| psynth::io::detail::caching_file_input_impl< Range, InputPtr >::caching_file_input_impl | ( | InputPtr | input = 0, |
| std::size_t | chunk_size = default_chunk_size, |
||
| std::size_t | buffer_size = default_buffer_size, |
||
| std::size_t | threshold = default_threshold |
||
| ) |
| psynth::io::detail::caching_file_input_impl< Range, InputPtr >::caching_file_input_impl | ( | caching_file_input_impl< Range, InputPtr > && | other | ) |
| psynth::io::detail::caching_file_input_impl< Range, InputPtr >::~caching_file_input_impl | ( | ) |
| void psynth::io::detail::caching_file_input_impl< Range, InputPtr >::do_seek | ( | std::ptrdiff_t | offst, |
| seek_dir | dir | ||
| ) |
| std::size_t psynth::io::detail::caching_file_input_impl< Range, InputPtr >::frame_rate | ( | ) | const [inline, virtual] |
Implements psynth::io::file_input_base< Range >.
| const input_type& psynth::io::detail::caching_file_input_impl< Range, InputPtr >::input | ( | ) | const [inline] |
| bool psynth::io::detail::caching_file_input_impl< Range, InputPtr >::is_backwards | ( | ) | const [inline] |
| std::size_t psynth::io::detail::caching_file_input_impl< Range, InputPtr >::length | ( | ) | const [inline, virtual] |
Implements psynth::io::file_input_base< Range >.
| void psynth::io::detail::caching_file_input_impl< Range, InputPtr >::run | ( | ) |
| std::size_t psynth::io::detail::caching_file_input_impl< Range, InputPtr >::seek | ( | std::ptrdiff_t | pos, |
| seek_dir | dir | ||
| ) | [virtual] |
Implements psynth::io::file_input_base< Range >.
| void psynth::io::detail::caching_file_input_impl< Range, InputPtr >::set_backwards | ( | bool | backwards | ) |
| void psynth::io::detail::caching_file_input_impl< Range, InputPtr >::set_chunk_size | ( | std::size_t | cs | ) | [inline] |
| void psynth::io::detail::caching_file_input_impl< Range, InputPtr >::set_input | ( | InputPtr | ptr | ) |
Reimplemented in psynth::io::caching_file_input_adapter< Range, InputPtr >, psynth::io::caching_file_input_adapter< interleaved_range, decltype(m_reader)>, psynth::io::caching_file_input_adapter< interleaved_range, decltype(m_reader_two)>, and psynth::io::caching_file_input_adapter< interleaved_range, decltype(m_reader_one)>.
| void psynth::io::detail::caching_file_input_impl< Range, InputPtr >::soft_seek | ( | std::size_t | pos | ) |
| void psynth::io::detail::caching_file_input_impl< Range, InputPtr >::start | ( | ) |
| void psynth::io::detail::caching_file_input_impl< Range, InputPtr >::stop | ( | ) |
| std::size_t psynth::io::detail::caching_file_input_impl< Range, InputPtr >::take | ( | const Range2 & | buf | ) |
| std::size_t psynth::io::detail::caching_file_input_impl< Range, InputPtr >::take | ( | const range & | buf | ) | [inline, virtual] |
Implements psynth::io::input< Range >.
| bool psynth::io::detail::caching_file_input_impl< Range, InputPtr >::_backwards |
| ring_buffer_type psynth::io::detail::caching_file_input_impl< Range, InputPtr >::_buffer |
| std::mutex psynth::io::detail::caching_file_input_impl< Range, InputPtr >::_buffer_mutex |
| std::size_t psynth::io::detail::caching_file_input_impl< Range, InputPtr >::_buffer_size |
| std::size_t psynth::io::detail::caching_file_input_impl< Range, InputPtr >::_chunk_size |
| std::condition_variable psynth::io::detail::caching_file_input_impl< Range, InputPtr >::_cond |
| std::atomic<bool> psynth::io::detail::caching_file_input_impl< Range, InputPtr >::_finished |
InputPtr psynth::io::detail::caching_file_input_impl< Range, InputPtr >::_input [protected] |
| std::mutex psynth::io::detail::caching_file_input_impl< Range, InputPtr >::_input_mutex |
| std::ptrdiff_t psynth::io::detail::caching_file_input_impl< Range, InputPtr >::_new_read_pos |
| ring_buffer_type::range& psynth::io::detail::caching_file_input_impl< Range, InputPtr >::_range |
| std::ptrdiff_t psynth::io::detail::caching_file_input_impl< Range, InputPtr >::_read_pos |
| ring_buffer_type::position psynth::io::detail::caching_file_input_impl< Range, InputPtr >::_read_ptr |
| std::thread psynth::io::detail::caching_file_input_impl< Range, InputPtr >::_thread |
| std::size_t psynth::io::detail::caching_file_input_impl< Range, InputPtr >::_threshold |
| input_buffer_type psynth::io::detail::caching_file_input_impl< Range, InputPtr >::_tmp_buffer |
constexpr std::size_t psynth::io::detail::caching_file_input_impl< Range, InputPtr >::default_buffer_size = 16384 [static] |
constexpr std::size_t psynth::io::detail::caching_file_input_impl< Range, InputPtr >::default_chunk_size = 1024 [static] |
constexpr std::size_t psynth::io::detail::caching_file_input_impl< Range, InputPtr >::default_threshold = 4096 [static] |
1.7.4