Skip to content

Commit

Permalink
fix up into earwurm format
Browse files Browse the repository at this point in the history
  • Loading branch information
beefchimi committed Jul 31, 2024
1 parent 220311f commit 9cb751d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions pkg/earwurm/src/Earwurm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ export class Earwurm extends EmittenCommon<ManagerEventMap> {

suspend() {
if (
this._state === 'closed' ||
this._state === 'suspended' ||
this._state === 'suspending'
this._state === 'closed'
|| this._state === 'suspended'
|| this._state === 'suspending'
) {
return this;
}
Expand Down
16 changes: 8 additions & 8 deletions pkg/earwurm/src/Sound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ export class Sound extends EmittenCommon<SoundEventMap> {
// Not yet sure how to resolve this.
this.#incrementLoop();

const timeSince =
Math.max(this.context.currentTime - this.#timestamp, 0) * this.speed;
const timeSince
= Math.max(this.context.currentTime - this.#timestamp, 0) * this.speed;

this.#progress.elapsed = clamp(
0,
Expand Down Expand Up @@ -255,9 +255,9 @@ export class Sound extends EmittenCommon<SoundEventMap> {
this.emit('state', value);

if (value === 'playing') {
this.#intervalId = this.hasProgressSub ?
requestAnimationFrame(this.#handleInterval) :
0;
this.#intervalId = this.hasProgressSub
? requestAnimationFrame(this.#handleInterval)
: 0;
}
// TODO: This should not be broken onto a separate line.
else {
Expand All @@ -275,9 +275,9 @@ export class Sound extends EmittenCommon<SoundEventMap> {
if (!this.loop) return;

if (
this.#progress.elapsed === this.duration ||
this.#progress.remaining === 0 ||
this.#progress.percentage === 100
this.#progress.elapsed === this.duration
|| this.#progress.remaining === 0
|| this.#progress.percentage === 100
) {
this.#progress.elapsed = 0;
this.#progress.remaining = this.duration;
Expand Down

0 comments on commit 9cb751d

Please sign in to comment.