We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hope to get wav header data from format attr. so i can detect wheater a 44 or 46-byte header.
format
The text was updated successfully, but these errors were encountered:
You can get the chunk size of fmt chunk with the following code If the chunk size <= 18, the header size will be 46
package main import ( "flag" "log" "os" riff "github.com/youpy/go-riff" ) func main() { var path = flag.String("path", "", "WAV file path") flag.Parse() file, err := os.Open(*path) if err != nil { panic(err) } reader := riff.NewReader(file) r, err := reader.Read() if err != nil { panic(err) } for _, chunk := range r.Chunks { chunkID := string(chunk.ChunkID[:]) log.Printf("Chunk ID: %s", chunkID) log.Printf("Chunk size: %d", chunk.ChunkSize) } }
Sorry, something went wrong.
No branches or pull requests
hope to get wav header data from
format
attr.so i can detect wheater a 44 or 46-byte header.
The text was updated successfully, but these errors were encountered: