A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.circuitpython.org/projects/wave/en/latest/examples.html below:

Simple test — Adafruit CircuitPython wave Library 1.0 documentation

Adafruit CircuitPython wave Library Simple test

Ensure your device works with this simple test.

examples/wave_simpletest.py
 1# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
 2# SPDX-FileCopyrightText: Copyright (c) 2023 Jeff Epler for Adafruit Industries
 3#
 4# SPDX-License-Identifier: Unlicense
 5
 6import adafruit_wave
 7
 8with adafruit_wave.open("sample.wav") as w:
 9    print(w.getsampwidth())
10    print(w.getnchannels())
11    print(list(memoryview(w.readframes(100)).cast("h")))

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4