Able to play .flac files.
This commit is contained in:
parent
c149d1b9e7
commit
c39db007d2
|
@ -34,7 +34,7 @@
|
||||||
#0100 .Screen/width DEO2
|
#0100 .Screen/width DEO2
|
||||||
( | .. )
|
( | .. )
|
||||||
message/<new>
|
message/<new>
|
||||||
;dict/mpg-cmd .Console/addr DEO2
|
;dict/flac-cmd .Console/addr DEO2
|
||||||
[ LIT2 03 -Console/mode ] DEO
|
[ LIT2 03 -Console/mode ] DEO
|
||||||
[ LIT2 01 -Console/exec ] DEO
|
[ LIT2 01 -Console/exec ] DEO
|
||||||
[ LIT2 00 -playing ] STZ
|
[ LIT2 00 -playing ] STZ
|
||||||
|
@ -282,6 +282,7 @@
|
||||||
<draw-progress>
|
<draw-progress>
|
||||||
<draw-timestamp> !message/<new>
|
<draw-timestamp> !message/<new>
|
||||||
|
|
||||||
|
( TODO: flac123 id3 format is different and more limited, sadly )
|
||||||
@handle-id3 ( buf* char -- )
|
@handle-id3 ( buf* char -- )
|
||||||
POP [ LIT ". ] find-next INC2 LDA2k
|
POP [ LIT ". ] find-next INC2 LDA2k
|
||||||
( | parse lines )
|
( | parse lines )
|
||||||
|
@ -293,6 +294,7 @@
|
||||||
OVR2 [ LIT ": ] find-next INC2 ;id3/album <scpy> }
|
OVR2 [ LIT ": ] find-next INC2 ;id3/album <scpy> }
|
||||||
POP2 POP2 !message/<new>
|
POP2 POP2 !message/<new>
|
||||||
|
|
||||||
|
( TODO: flac123 doesn't use "@P 3" so we'd need to use "@P 0" )
|
||||||
@handle-pause ( buf* char -- )
|
@handle-pause ( buf* char -- )
|
||||||
POP INC2 INC2 LDA
|
POP INC2 INC2 LDA
|
||||||
( stop ) DUP [ LIT "0 ] NEQ ?{ }
|
( stop ) DUP [ LIT "0 ] NEQ ?{ }
|
||||||
|
@ -354,7 +356,7 @@
|
||||||
@<parse-line> ( line* -- )
|
@<parse-line> ( line* -- )
|
||||||
#0005 ADD2 LDAk [ LIT ". ] EQU ?&hidden
|
#0005 ADD2 LDAk [ LIT ". ] EQU ?&hidden
|
||||||
is-folder ?&folder
|
is-folder ?&folder
|
||||||
is-mp3 ?&mp3
|
is-flac ?&flac
|
||||||
POP2 JMP2r
|
POP2 JMP2r
|
||||||
|
|
||||||
&folder ( line* -- )
|
&folder ( line* -- )
|
||||||
|
@ -366,7 +368,7 @@
|
||||||
.lines/folders LDZ INC .lines/folders STZ
|
.lines/folders LDZ INC .lines/folders STZ
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
&mp3 ( line* -- )
|
&flac ( line* -- )
|
||||||
DUP2 llen
|
DUP2 llen
|
||||||
( CELLSIZE ) #007f LTH2 ?{ POP2 JMP2r }
|
( CELLSIZE ) #007f LTH2 ?{ POP2 JMP2r }
|
||||||
;mem/tracks [ LIT2 00 -lines/tracks ] LDZ
|
;mem/tracks [ LIT2 00 -lines/tracks ] LDZ
|
||||||
|
@ -433,6 +435,9 @@
|
||||||
@is-mp3 ( line* -- line*f )
|
@is-mp3 ( line* -- line*f )
|
||||||
DUP2 lcap/ #0003 SUB2 ;dict/mp3-ext !scmp3
|
DUP2 lcap/ #0003 SUB2 ;dict/mp3-ext !scmp3
|
||||||
|
|
||||||
|
@is-flac ( line* -- line*f )
|
||||||
|
DUP2 lcap/ #0004 SUB2 ;dict/flac-ext !scmp4
|
||||||
|
|
||||||
@pos-to-seconds ( pos* -- seconds* )
|
@pos-to-seconds ( pos* -- seconds* )
|
||||||
.secfrom LDZ2 .secto LDZ2 ADD2 #00e7 DIV2k STH2k MUL2 SUB2 OVR2 STH2
|
.secfrom LDZ2 .secto LDZ2 ADD2 #00e7 DIV2k STH2k MUL2 SUB2 OVR2 STH2
|
||||||
MUL2r MUL2 #00e7 DIV2 STH2r ADD2 JMP2r
|
MUL2r MUL2 #00e7 DIV2 STH2r ADD2 JMP2r
|
||||||
|
@ -846,6 +851,11 @@
|
||||||
LDAkr LDAk STHr NEQ ?{ INC2r INC2 }
|
LDAkr LDAk STHr NEQ ?{ INC2r INC2 }
|
||||||
LDA2r LDA2 STH2r EQU2 JMP2r
|
LDA2r LDA2 STH2r EQU2 JMP2r
|
||||||
|
|
||||||
|
@scmp4 ( a* b* -- f )
|
||||||
|
STH2
|
||||||
|
LDA2kr LDA2k STH2r NEQ2 ?{ INC2r INC2r INC2 INC2 }
|
||||||
|
LDA2r LDA2 STH2r EQU2 JMP2r
|
||||||
|
|
||||||
@<scpy> ( src* dst* -: )
|
@<scpy> ( src* dst* -: )
|
||||||
STH2
|
STH2
|
||||||
&>w ( src* `dst* -- )
|
&>w ( src* `dst* -- )
|
||||||
|
@ -940,8 +950,9 @@
|
||||||
@dict
|
@dict
|
||||||
&home-path "./ $1
|
&home-path "./ $1
|
||||||
&mp3-ext "mp3 $1
|
&mp3-ext "mp3 $1
|
||||||
|
&flac-ext "flac $1
|
||||||
&empty "(empty) $1
|
&empty "(empty) $1
|
||||||
&mpg-cmd "mpg123 20 "-R $1
|
&flac-cmd "flac123 20 "-R $1
|
||||||
&load-cmd "load 20 $1
|
&load-cmd "load 20 $1
|
||||||
&jump-cmd "jump 20 $1
|
&jump-cmd "jump 20 $1
|
||||||
&pause-cmd "pause 0a $1
|
&pause-cmd "pause 0a $1
|
||||||
|
|
Loading…
Reference in New Issue