stdcpp-audio / proposals

LaTeX source of the proposals
6 stars 0 forks source link

Concerns over p1386r1 #1

Open ghost opened 5 years ago

ghost commented 5 years ago

audio_buffer is just a view

Why? People would want proper audio containers where they can properly resize them. At least consider renaming it to audio_buffer_view.

audio_buffer doesn't work with ranges

Why? What's so extremely hard with 'view of views' approach? I've done it for my audio library and haven't had any issues.

bool set_sample_rate(sample_rate_t); and others.

They should throw on failure. If you want a no-throw version, provide an error_code& overload.

span<sample_rate_t> audio_device::get_supported_sample_rates() const noexcept; and others

Why span and not vector? This function will need to do dynamic allocation most likely anyway. vector version can take an allocator.

bool audio_device::start();

It should return a RAII handle such as std::running_audio_device.

string_view audio_device::name();

Consider removing this for now in favor returning proper Unicode supporting type later.

convert_audio_buffer

It says expects same amount of frames but not same amount of channels.

ghost commented 5 years ago

Update for R2:

get_supported_sample_rates

Was removed so no longer applicable.

convert_audio_buffer

Was removed so no longer applicable.

The rest stands.