Code Monkey home page Code Monkey logo

wv4dart's People

Contributors

nistvan86 avatar soiaf avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

soiaf

wv4dart's Issues

Some changes needed for new version of Dart

Hi,

I'd like to have a closer look at your code to see if there are any suggestions I can make, either fixing bugs or improving performance. However there are a few things that need to be looked at first in the code so I thought I'd pass them on (before I look at the actual WavPack processing code as such). I tried your code with the current version of dart.

In dartutils.dart, .asByteArray() does not seem to be supported anymore, so I used the following equivalent (change as appropriate in the 3 places)
return (new ByteData.view(resultList.buffer)).getInt32(0,Endianness.LITTLE_ENDIAN);

This seemed to work well enough to at least get past that part of the code.

In main.dart I changed the following line for your read() method in your RandomAccessWavPackFile class - I changed

return _file.readListSync(buffer, offset, length);

to

return _file.readIntoSync(buffer, offset, offset+length);

In main.dart I was also getting an error about RandomFile so I made 2 changes, when opening I used:

File outputf = new File("output.wav");
RandomAccessFile output = outputf.openSync(mode: FileMode.WRITE);

and then actually writing the data its now

output.writeFromSync(pcm_buffer,0, samples_unpacked * bps);

However, while this actually allowed the code to run and start producing output, it gave an out of memory error, so definitely something needs to be change around here.

With these changes I was able to successfully decode a very small test file, however larger files were giving the out of memory error so I wasn't able to start looking at your actual WavPack routines.

Peter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.