File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2748,7 +2748,7 @@ nframes = <Wave_read>.getnframes() # Number of frames.
2748
2748
```
2749
2749
2750
2750
``` python
2751
- < Wave_write> = wave.open(' <path>' , ' wb' ) # Truncates existing file.
2751
+ < Wave_write> = wave.open(' <path>' , ' wb' ) # Truncates file if it exists .
2752
2752
< Wave_write> .setframerate(< int > ) # 44100 for CD, 48000 for video.
2753
2753
< Wave_write> .setnchannels(< int > ) # 1 for mono, 2 for stereo.
2754
2754
< Wave_write> .setsampwidth(< int > ) # 2 for CD quality sound.
Original file line number Diff line number Diff line change 2338
2338
<params> = <Wave_read>.getparams() < span class ="hljs-comment "> # Immutable collection of above.</ span >
2339
2339
<bytes> = <Wave_read>.readframes(nframes) < span class ="hljs-comment "> # Returns next 'nframes' frames.</ span >
2340
2340
</ code > </ pre >
2341
- < pre > < code class ="python language-python hljs "> <Wave_write> = wave.open(< span class ="hljs-string "> '<path>'</ span > , < span class ="hljs-string "> 'wb'</ span > ) < span class ="hljs-comment "> # Truncates existing file.</ span >
2341
+ < pre > < code class ="python language-python hljs "> <Wave_write> = wave.open(< span class ="hljs-string "> '<path>'</ span > , < span class ="hljs-string "> 'wb'</ span > ) < span class ="hljs-comment "> # Truncates file if it exists .</ span >
2342
2342
<Wave_write>.setframerate(<int>) < span class ="hljs-comment "> # 44100 for CD, 48000 for video.</ span >
2343
2343
<Wave_write>.setnchannels(<int>) < span class ="hljs-comment "> # 1 for mono, 2 for stereo.</ span >
2344
2344
<Wave_write>.setsampwidth(<int>) < span class ="hljs-comment "> # 2 for CD quality sound.</ span >
You can’t perform that action at this time.
0 commit comments