mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-24 09:27:31 +09:00
add configure option '--enable-int-audio-sample' for speed and audio driver compatibility, and fixups in exports and webrtc.
This commit is contained in:
parent
864fc133a3
commit
ef5e4f06e0
4 changed files with 37 additions and 1 deletions
|
|
@ -32,7 +32,9 @@ AudioClassifier::AudioClassifier()
|
|||
kDefaultFrameSizeSamples,
|
||||
NULL)) {
|
||||
assert(celt_mode_);
|
||||
#ifndef MOZ_SAMPLE_TYPE_S16
|
||||
tonality_analysis_init(&analysis_state_, kDefaultSampleRateHz);
|
||||
#endif
|
||||
}
|
||||
|
||||
AudioClassifier::~AudioClassifier() {}
|
||||
|
|
@ -46,6 +48,7 @@ bool AudioClassifier::Analysis(const int16_t* input,
|
|||
// Only mono or stereo are allowed.
|
||||
assert(channels == 1 || channels == 2);
|
||||
|
||||
#ifndef MOZ_SAMPLE_TYPE_S16
|
||||
// Call Opus' classifier, defined in
|
||||
// "third_party/opus/src/src/analysis.h", with lsb_depth = 16.
|
||||
// Also uses a down-mixing function downmix_int, defined in
|
||||
|
|
@ -65,6 +68,9 @@ bool AudioClassifier::Analysis(const int16_t* input,
|
|||
&analysis_info_);
|
||||
music_probability_ = analysis_info_.music_prob;
|
||||
is_music_ = music_probability_ > kDefaultThreshold;
|
||||
#else
|
||||
is_music_ = false;
|
||||
#endif
|
||||
return is_music_;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue