This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2007年11月11日 20:15 by jeroen, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (8) | |||
|---|---|---|---|
| msg57377 - (view) | Author: jeroen (jeroen) | Date: 2007年11月11日 20:15 | |
When you write sound files wav sunau of aifc and you are using 16 bits samples. The number of frames in the files is incorrect. close function which updates the headers makes a mistake I assume. For the sunau type I had to double the number of frames in the close function to make it correct. If you do not correctg number of frames a 10 second file will play 5 seconds |
|||
| msg57404 - (view) | Author: Guido van Rossum (gvanrossum) * (Python committer) | Date: 2007年11月12日 17:24 | |
What software do you use to play the sample? Is it perhaps ignoring the nchannels value from the header? |
|||
| msg57418 - (view) | Author: jeroen (jeroen) | Date: 2007年11月12日 18:35 | |
I played using winsound.PlaySound function for the wav. I used VLC and windows media player for wav,au and aiff after that All had the same problem. It was solved for sunau by doubling the nframes number written by the close function in the sunau module. I assume something similar should be done for the wav and aiff modules. This is what I changed in sunau I am not sure if adding *self._sampwidth breaks something else. It works for me now when I create 16bit stereo files. def _patchheader(self): self._file.seek(8) # jjk added * sampwidth otherwise for 16 bit you get wrong nframes _write_u32(self._file, self._datawritten*self._sampwidth) self._datalength = self._datawritten self._file.seek(0, 2) Hope this helps. greetings |
|||
| msg57575 - (view) | Author: Guido van Rossum (gvanrossum) * (Python committer) | Date: 2007年11月15日 23:26 | |
Crys, since you apparently have working sound on Windows, could you have a look at this? There's also an (unrelated) issue with sunau.py on Py3k, it doesn't work (but the unittests aren't strong enough to discover that :-). |
|||
| msg116785 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2010年09月18日 14:34 | |
Is this still valid? |
|||
| msg116792 - (view) | Author: jeroen (jeroen) | Date: 2010年09月18日 15:11 | |
as far as I know. But i have not use or tested it since a long time On Sat, Sep 18, 2010 at 4:34 PM, Mark Lawrence <report@bugs.python.org>wrote: > > Mark Lawrence <breamoreboy@yahoo.co.uk> added the comment: > > Is this still valid? > > ---------- > nosy: +BreamoreBoy -gvanrossum > versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6, Python 3.0 > > _______________________________________ > Python tracker <report@bugs.python.org> > <http://bugs.python.org/issue1423> > _______________________________________ > |
|||
| msg191789 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2013年06月24日 17:12 | |
Is somebody interested in this bug? |
|||
| msg235682 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年02月10日 11:48 | |
This is a duplicate of issue8311. Was fixed in 3.4. In 2.7 you should first convert your data to str, bytearray, array('B') or buffer. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:28 | admin | set | github: 45764 |
| 2015年02月10日 11:48:21 | serhiy.storchaka | set | status: languishing -> closed superseder: wave module sets data subchunk size incorrectly when writing wav file versions: - Python 3.3, Python 3.4 nosy: + serhiy.storchaka messages: + msg235682 resolution: duplicate |
| 2014年02月03日 19:53:42 | BreamoreBoy | set | nosy:
- BreamoreBoy |
| 2013年06月24日 17:12:27 | christian.heimes | set | status: open -> languishing assignee: christian.heimes -> messages: + msg191789 versions: + Python 3.3, Python 3.4, - Python 3.1, Python 3.2 |
| 2013年02月06日 19:15:19 | serhiy.storchaka | set | files: - unnamed |
| 2010年09月18日 15:11:24 | jeroen | set | files:
+ unnamed messages: + msg116792 |
| 2010年09月18日 14:34:02 | BreamoreBoy | set | nosy:
+ BreamoreBoy, - gvanrossum messages: + msg116785 versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6, Python 3.0 |
| 2009年04月07日 04:05:11 | ajaksu2 | set | stage: test needed type: behavior components: + Windows versions: + Python 2.6, Python 3.0, - Python 2.5 |
| 2007年11月15日 23:26:55 | gvanrossum | set | priority: normal assignee: christian.heimes messages: + msg57575 nosy: + christian.heimes |
| 2007年11月12日 18:35:27 | jeroen | set | messages: + msg57418 |
| 2007年11月12日 17:24:23 | gvanrossum | set | nosy:
+ gvanrossum messages: + msg57404 |
| 2007年11月11日 20:15:28 | jeroen | create | |