Move dictionary for string types out of SoundFile class
Remove superfluous parentheses in return statement
Fix __setattr__()

In new-style classes the base class __setattr__() has to be called
instead of inserting the value into self.__dict__.

See http://docs.python.org/2/reference/datamodel.html#customizing-attribute-access
Fix a seek-related bug
Read whole file if frames is negative

... in contrast to if frames == -1

This corresponds to the behaviour of standard Python file objects.
Add close() method

Closes #14
Return float64 by default

Closes #17
Fix missing 'count' in vio_write()
Add _getAttributeNames()

This is useful for auto-completion in IDEs.
Make __getattr__() more compact
Remove exclamation marks from error messages
Merge pull request #30 from bastibe/a-part-of-22

A lot of smaller improvements based on #18, #22, and #30.
many changes: formats, modes, dtype, sf_open_fd(), ...

This commit holds several changes which were discussed in #22 (which was
itself based on #18).

Change handling of file formats:
File formats are handled as three simple strings: format, subtype and endian.

Add "which" argument to seek().
This is needed because the combination with logical or (e.g. SEEK_SET | READ)
isn't possible with string formats.

Update frames counter on write().

Hide all non-API names in module namespace (by prefixing _).
This is relevant for tools that do introspection, e.g. for
auto-completion in IDEs.

Support sf_open_fd(), remove obsolete argument virtual_io
The first constructor argument can now be:
- a string (path to a file)
- an int (a file descriptor)
- a file-like object
The argument virtual_io is not needed, because this can be detected
automatically.
Closes #19

Get file extension from 'name' attribute of a file-like object.

Change public attributes of SoundFile class to properties.

Add 'name' property.

Add properties 'format_info' and 'subtype_info'.

Proper handling of dtype's in read() and write().

Add function default_subtype().
_init_vio(): try readinto(), fall back to read()

Change argument name fObj to file.

Return dict directly instead of creating a local variable.

This was part of #22.
Add available_formats(), available_subtypes() and format_check()
Add open(), read() and write() functions
read()/write() overhaul

Replace ffi.new() with np.empty() and np.ascontiguousarray()

Remove dicts for readers/writers

read():
* reserve only as much memory as needed (if 'frames' is too large)
* check return value of sf_readf_*()

write():
* avoid copy if data has already the correct memory layout
* check return value of sf_writef_*()
* don't return the number of written frames!
  This is for symmetry with read() and it's redundant information anyway

As the written frames are now checked in the write() method, the same
check was removed from the write() *function*.
Add arguments channels_first, always_2d, out and fill_value

See also #16
Add blocks() method and function