Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
sample_spec_to_str.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2023 Roc Streaming authors
3
*
4
* This Source Code Form is subject to the terms of the Mozilla Public
5
* License, v. 2.0. If a copy of the MPL was not distributed with this
6
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
*/
8
9
//! @file roc_audio/sample_spec_to_str.h
10
//! @brief Format SampleSpec to string.
11
12
#ifndef ROC_AUDIO_SAMPLE_SPEC_TO_STR_H_
13
#define ROC_AUDIO_SAMPLE_SPEC_TO_STR_H_
14
15
#include "
roc_audio/sample_spec.h
"
16
#include "
roc_core/noncopyable.h
"
17
18
namespace
roc
{
19
namespace
audio {
20
21
//! Format SampleSpec to string.
22
class
sample_spec_to_str
:
public
core::NonCopyable
<> {
23
public
:
24
//! Construct.
25
explicit
sample_spec_to_str
(
const
SampleSpec
&);
26
27
//! Get formatted string.
28
const
char
*
c_str
()
const
{
29
return
buf_;
30
}
31
32
private
:
33
char
buf_[192];
34
};
35
36
}
// namespace audio
37
}
// namespace roc
38
39
#endif
// ROC_AUDIO_SAMPLE_SPEC_TO_STR_H_
roc::audio::SampleSpec
Sample specification. Describes sample rate and channels.
Definition:
sample_spec.h:30
roc::audio::sample_spec_to_str
Format SampleSpec to string.
Definition:
sample_spec_to_str.h:22
roc::audio::sample_spec_to_str::c_str
const char * c_str() const
Get formatted string.
Definition:
sample_spec_to_str.h:28
roc::audio::sample_spec_to_str::sample_spec_to_str
sample_spec_to_str(const SampleSpec &)
Construct.
roc::core::NonCopyable
Base class for non-copyable objects.
Definition:
noncopyable.h:23
roc
Root namespace.
noncopyable.h
Non-copyable object.
sample_spec.h
Sample specifications.
roc_audio
sample_spec_to_str.h
Generated by
1.9.1