{"action":"created","issue":{"url":"https://api.github.com/repos/scipy/scipy/issues/5350","labels_url":"https://api.github.com/repos/scipy/scipy/issues/5350/labels{/name}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/5350/comments","events_url":"https://api.github.com/repos/scipy/scipy/issues/5350/events","html_url":"https://github.com/scipy/scipy/pull/5350","id":111042254,"number":5350,"title":"FIX error, when reading 32-bit float wav files","user":{"login":"raphaelw","id":3168852,"avatar_url":"https://avatars.githubusercontent.com/u/3168852?v=3","gravatar_id":"","url":"https://api.github.com/users/raphaelw","html_url":"https://github.com/raphaelw","followers_url":"https://api.github.com/users/raphaelw/followers","following_url":"https://api.github.com/users/raphaelw/following{/other_user}","gists_url":"https://api.github.com/users/raphaelw/gists{/gist_id}","starred_url":"https://api.github.com/users/raphaelw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphaelw/subscriptions","organizations_url":"https://api.github.com/users/raphaelw/orgs","repos_url":"https://api.github.com/users/raphaelw/repos","events_url":"https://api.github.com/users/raphaelw/events{/privacy}","received_events_url":"https://api.github.com/users/raphaelw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-10-12T19:47:49Z","updated_at":"2015-10-15T00:56:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/scipy/scipy/pulls/5350","html_url":"https://github.com/scipy/scipy/pull/5350","diff_url":"https://github.com/scipy/scipy/pull/5350.diff","patch_url":"https://github.com/scipy/scipy/pull/5350.patch"},"body":"The FMT chunk of 32-bit float wave files has an additional \"cbSize\" field by convention. That means that their FMT chunk size is larger than 16 bytes by default. The current buggy version of _read_fmt_chunk(fid) overwrites the \"wFormatTag\" (called comp in the code) field of ALL files with a larger FMT chunk. Therefore wavfile.read() reads every 32-bit float wave file as 32-bit integer.\r\n\r\nsee Spec:\r\nhttp://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html"},"comment":{"url":"https://api.github.com/repos/scipy/scipy/issues/comments/148243844","html_url":"https://github.com/scipy/scipy/pull/5350#issuecomment-148243844","issue_url":"https://api.github.com/repos/scipy/scipy/issues/5350","id":148243844,"user":{"login":"raphaelw","id":3168852,"avatar_url":"https://avatars.githubusercontent.com/u/3168852?v=3","gravatar_id":"","url":"https://api.github.com/users/raphaelw","html_url":"https://github.com/raphaelw","followers_url":"https://api.github.com/users/raphaelw/followers","following_url":"https://api.github.com/users/raphaelw/following{/other_user}","gists_url":"https://api.github.com/users/raphaelw/gists{/gist_id}","starred_url":"https://api.github.com/users/raphaelw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphaelw/subscriptions","organizations_url":"https://api.github.com/users/raphaelw/orgs","repos_url":"https://api.github.com/users/raphaelw/repos","events_url":"https://api.github.com/users/raphaelw/events{/privacy}","received_events_url":"https://api.github.com/users/raphaelw/received_events","type":"User","site_admin":false},"created_at":"2015-10-15T00:56:26Z","updated_at":"2015-10-15T00:56:26Z","body":"wavfile.write() now adds compliant header for non-PCM format (usually float):\r\n- cbSize field in fmt chunk\r\n- fact chunk\r\n\r\nother fixes:\r\n- original code falsely reads every chunk size field as signed integer\r\n- fixed endian independence (RIFX) of my over all pull request\r\n\r\nother thoughts:\r\nthe global variable `_big_endian` is used to determine the endiannes of the current file. this is not thread safe. i'm not familiar with how strict the scipy project handles this topic. should it be mentioned in the doc string? "}}