forked from FoundKeyGang/FoundKey
Compare commits
No commits in common. "f383aec1cd5a9f8a44539d9f802dee2d1332f64c" and "6c5723c795a3610558111f5d0cd6f39dcfd06965" have entirely different histories.
f383aec1cd
...
6c5723c795
2 changed files with 3 additions and 7 deletions
|
@ -20,7 +20,7 @@
|
|||
</button>
|
||||
<progress min="0" max="100" value="0" ref="progress"></progress>
|
||||
<input type="range" min="0" max="1" v-model="player.context.gain.value" step="0.1" ref="volume" title="volume"/>
|
||||
<a class="download" title="download" :href="module.url" target="_blank">
|
||||
<a class="download" title="download" :href="module.url">
|
||||
<i class="fas fa-download"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -75,7 +75,7 @@ let hide = ref((defaultStore.state.nsfw === 'force') ? true : props.module.isSen
|
|||
let playing = ref(false);
|
||||
let displayCanvas = ref<HTMLCanvasElement>(null);
|
||||
let progress = ref<HTMLProgressElement>(null);
|
||||
const player = ref(new ChiptuneJsPlayer(new ChiptuneJsConfig()));
|
||||
const player = ref(new ChiptuneJsPlayer(new ChiptuneJsConfig(1)));
|
||||
|
||||
const rowBuffer = 24;
|
||||
let buffer = null;
|
||||
|
@ -99,10 +99,6 @@ function playPause() {
|
|||
display();
|
||||
});
|
||||
|
||||
player.value.addHandler('onEnded', () => {
|
||||
stop();
|
||||
});
|
||||
|
||||
if (player.value.currentPlayingNode === null) {
|
||||
player.value.play(buffer);
|
||||
playing.value = true;
|
||||
|
|
|
@ -115,7 +115,7 @@ ChiptuneJsPlayer.prototype.play = function (buffer: ArrayBuffer) {
|
|||
if (processNode === null) {
|
||||
return;
|
||||
}
|
||||
libopenmpt._openmpt_module_set_repeat_count(processNode.modulePtr, this.config.repeatCount || 0);
|
||||
libopenmpt._openmpt_module_set_repeat_count(processNode.modulePtr, this.config.repeatCount || 1);
|
||||
this.currentPlayingNode = processNode;
|
||||
processNode.connect(this.context);
|
||||
this.context.connect(this.audioContext.destination);
|
||||
|
|
Loading…
Reference in a new issue