File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -68,25 +68,32 @@ std::string to_string(Encoding v) {
68
68
}
69
69
70
70
Encoding get_encoding_from_option (const std::optional<std::string>& encoding) {
71
- if (!encoding.has_value ())
71
+ if (!encoding.has_value ()) {
72
72
return Encoding::NOT_PROVIDED;
73
+ }
73
74
std::string v = encoding.value ();
74
- if (v == " PCM_S" )
75
+ if (v == " PCM_S" ) {
75
76
return Encoding::PCM_SIGNED;
76
- if (v == " PCM_U" )
77
+ }
78
+ if (v == " PCM_U" ) {
77
79
return Encoding::PCM_UNSIGNED;
78
- if (v == " PCM_F" )
80
+ }
81
+ if (v == " PCM_F" ) {
79
82
return Encoding::PCM_FLOAT;
80
- if (v == " ULAW" )
83
+ }
84
+ if (v == " ULAW" ) {
81
85
return Encoding::ULAW;
82
- if (v == " ALAW" )
86
+ }
87
+ if (v == " ALAW" ) {
83
88
return Encoding::ALAW;
89
+ }
84
90
TORCH_CHECK (false , " Internal Error: unexpected encoding value: " , v);
85
91
}
86
92
87
93
BitDepth get_bit_depth_from_option (const std::optional<int64_t >& bit_depth) {
88
- if (!bit_depth.has_value ())
94
+ if (!bit_depth.has_value ()) {
89
95
return BitDepth::NOT_PROVIDED;
96
+ }
90
97
int64_t v = bit_depth.value ();
91
98
switch (v) {
92
99
case 8 :
You can’t perform that action at this time.
0 commit comments