flacworker: don't use the Grand Unified Logger
There are just a couple of logs in this feature, and it's a standalone bundle, which would bloat it due to cascaded dependencis.
This commit is contained in:
parent
5276cb6bc8
commit
d436825a45
|
@ -1,4 +1,4 @@
|
||||||
import logger from '../../logger';
|
|
||||||
import {
|
import {
|
||||||
MAIN_THREAD_FINISH,
|
MAIN_THREAD_FINISH,
|
||||||
MAIN_THREAD_INIT,
|
MAIN_THREAD_INIT,
|
||||||
|
@ -262,7 +262,7 @@ class Encoder {
|
||||||
const errorNo
|
const errorNo
|
||||||
= Flac.FLAC__stream_encoder_get_state(this._encoderId);
|
= Flac.FLAC__stream_encoder_get_state(this._encoderId);
|
||||||
|
|
||||||
logger.error('Error during encoding', FLAC_ERRORS[errorNo]);
|
console.error('Error during encoding', FLAC_ERRORS[errorNo]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,7 +277,7 @@ class Encoder {
|
||||||
|
|
||||||
const status = Flac.FLAC__stream_encoder_finish(this._encoderId);
|
const status = Flac.FLAC__stream_encoder_finish(this._encoderId);
|
||||||
|
|
||||||
logger.log('Flac encoding finished: ', status);
|
console.log('Flac encoding finished: ', status);
|
||||||
|
|
||||||
// free up resources
|
// free up resources
|
||||||
Flac.FLAC__stream_encoder_delete(this._encoderId);
|
Flac.FLAC__stream_encoder_delete(this._encoderId);
|
||||||
|
@ -371,8 +371,7 @@ self.onmessage = function(e) {
|
||||||
|
|
||||||
case MAIN_THREAD_NEW_DATA_ARRIVED:
|
case MAIN_THREAD_NEW_DATA_ARRIVED:
|
||||||
if (encoder === null) {
|
if (encoder === null) {
|
||||||
logger.error('flacEncoderWorker received data when the encoder is'
|
console.error('flacEncoderWorker received data when the encoder is not ready.');
|
||||||
+ 'not ready.');
|
|
||||||
} else {
|
} else {
|
||||||
encoder.encode(e.data.buf);
|
encoder.encode(e.data.buf);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue