mirror of
https://github.com/bloeys/wavy.git
synced 2025-12-29 09:28:19 +00:00
Put spaces after //
This commit is contained in:
@ -26,14 +26,14 @@ func (ws *WavStreamer) Read(outBuf []byte) (bytesRead int, err error) {
|
||||
|
||||
func (ws *WavStreamer) Seek(offset int64, whence int) (int64, error) {
|
||||
|
||||
//This will only seek the underlying file but not the actual decoder because it can't seek
|
||||
// This will only seek the underlying file but not the actual decoder because it can't seek
|
||||
n, err := ws.Dec.Seek(offset, whence)
|
||||
if err != nil {
|
||||
return n, err
|
||||
}
|
||||
|
||||
//Since underlying decoder can't seek back, if the requested movement is back we have to rewind the decoder
|
||||
//then seek forward to the requested position.
|
||||
// Since underlying decoder can't seek back, if the requested movement is back we have to rewind the decoder
|
||||
// then seek forward to the requested position.
|
||||
if n < ws.Pos {
|
||||
|
||||
err = ws.Dec.Rewind()
|
||||
@ -41,7 +41,7 @@ func (ws *WavStreamer) Seek(offset int64, whence int) (int64, error) {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
//Anything before PCMStart is not valid sound, so the minimum seek back we allow is PCMStart
|
||||
// Anything before PCMStart is not valid sound, so the minimum seek back we allow is PCMStart
|
||||
if n < ws.PCMStart {
|
||||
n = ws.PCMStart
|
||||
} else {
|
||||
@ -56,7 +56,7 @@ func (ws *WavStreamer) Seek(offset int64, whence int) (int64, error) {
|
||||
return n, err
|
||||
}
|
||||
|
||||
//Size returns number of bytes
|
||||
// Size returns number of bytes
|
||||
func (ws *WavStreamer) Size() int64 {
|
||||
return ws.Dec.PCMLen()
|
||||
}
|
||||
@ -68,7 +68,7 @@ func NewWavStreamer(f *os.File, wavDec *wav.Decoder) (*WavStreamer, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
//The actual data starts somewhat within the file, not at 0
|
||||
// The actual data starts somewhat within the file, not at 0
|
||||
currPos, err := wavDec.Seek(0, 1)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user