forked from hegedustibor/htgo-tts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
kendfss
committed
Dec 16, 2022
1 parent
04f3cda
commit 5618c8d
Showing
8 changed files
with
260 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
package handlers | ||
|
||
import "io" | ||
|
||
type PlayerInterface interface { | ||
Play(fileName string) error | ||
} | ||
PlayBuf(io.Reader) error | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
package handlers | ||
|
||
import ( | ||
"errors" | ||
"io" | ||
"os/exec" | ||
) | ||
|
||
type MPlayer struct {} | ||
type MPlayer struct{} | ||
|
||
func (MPlayer *MPlayer) Play(fileName string) error { | ||
mplayer := exec.Command("mplayer", "-cache", "8092", "-", fileName) | ||
return mplayer.Run() | ||
} | ||
|
||
func (MPlayer *MPlayer) PlayBuf(buf io.Reader) error { | ||
return errors.New("MPlayer.PlayBuf: Not implemented") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.