From 6512572fed3b46b208130957c1e586e79d2628a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Thu, 22 Aug 2019 22:36:56 +0200 Subject: [PATCH] Audio --- README.md | 4 ++-- index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a458003..e3b23da 100644 --- a/README.md +++ b/README.md @@ -2689,7 +2689,7 @@ nframes = .getnframes() # Number of frames. ┗━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━━━━┛ ``` -### Read Float Frames from WAV File +### Read Float Samples from WAV File ```python def read_wav_file(filename): def get_int(a_bytes): @@ -2702,7 +2702,7 @@ def read_wav_file(filename): return [get_int(a) / pow(2, width * 8 - 1) for a in chunks] ``` -### Write Float Frames to WAV File +### Write Float Samples to WAV File ```python def write_to_wav_file(filename, frames_float, nchannels=1, sampwidth=2, framerate=44100): def get_bytes(a_float): diff --git a/index.html b/index.html index c979579..607f51d 100644 --- a/index.html +++ b/index.html @@ -2285,7 +2285,7 @@ nframes = <Wave_read>.getnframes() -

Read Float Frames from WAV File

def read_wav_file(filename):
+

Read Float Samples from WAV File

def read_wav_file(filename):
     def get_int(a_bytes):
         an_int = int.from_bytes(a_bytes, 'little', signed=width!=1)
         return an_int - 128 * (width == 1)
@@ -2296,7 +2296,7 @@ nframes      = <Wave_read>.getnframes()         return [get_int(a) / pow(2, width * 8 - 1) for a in chunks]
 
-

Write Float Frames to WAV File

def write_to_wav_file(filename, frames_float, nchannels=1, sampwidth=2, framerate=44100):
+

Write Float Samples to WAV File

def write_to_wav_file(filename, frames_float, nchannels=1, sampwidth=2, framerate=44100):
     def get_bytes(a_float):
         a_float = max(-1, min(1 - 2e-16, a_float))
         a_float += sampwidth == 1