Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions main/common/settings/default-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ export const DEFAULT_SETTINGS = {
fullPlayerPositionSizeMaximized: '50;50;1000;650;0',
coverPlayerPosition: '50;50',
useGaplessPlayback: false,
useCrossfade: false,
crossfadeDuration: 5,
jumpToPlayingSong: true,
showSquareImages: false,
useCompactYearView: false,
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/app/common/settings/settings.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ export abstract class SettingsBase {
public abstract fullPlayerPositionSizeMaximized: string;
public abstract coverPlayerPosition: string;
public abstract useGaplessPlayback: boolean;
public abstract useCrossfade: boolean;
public abstract crossfadeDuration: number;
public abstract jumpToPlayingSong: boolean;
public abstract showSquareImages: boolean;
public abstract useCompactYearView: boolean;
Expand Down
18 changes: 18 additions & 0 deletions src/app/common/settings/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,24 @@ export class Settings implements SettingsBase {
this.set('useGaplessPlayback', v);
}

// useCrossfade
public get useCrossfade(): boolean {
return this.get<boolean>('useCrossfade');
}

public set useCrossfade(v: boolean) {
this.set('useCrossfade', v);
}

// crossfadeDuration
public get crossfadeDuration(): number {
return this.get<number>('crossfadeDuration');
}

public set crossfadeDuration(v: number) {
this.set('crossfadeDuration', v);
}

// jumpToPlayingSong
public get jumpToPlayingSong(): boolean {
return this.get<boolean>('jumpToPlayingSong');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class AudioPlayerFactory {
public create(): IAudioPlayer {
if (this.settings.useGaplessPlayback) {
this.logger.info('Creating GaplessAudioPlayer for audio playback.', 'AudioPlayerFactory', 'create');
return new GaplessAudioPlayer(this.mathExtensions, this.logger);
return new GaplessAudioPlayer(this.mathExtensions, this.logger, this.settings);
} else {
this.logger.info('Creating LegacyAudioPlayer for audio playback.', 'AudioPlayerFactory', 'create');
return new LegacyAudioPlayer(this.mathExtensions, this.logger);
Expand Down
Loading