Code Monkey home page Code Monkey logo

Comments (8)

alexbw avatar alexbw commented on August 30, 2024

NSData is not the best storage format for live audio, but you might consult this post: http://stackoverflow.com/questions/4859760/obj-c-how-to-convert-nsdata-to-an-array-of-ints

If you're performance limited, I'd suggest unloading all the audio ahead of time into an array, and reading through it when it's time to play it.

On Oct 17, 2013, at 10:20 PM, Rjonhson [email protected] wrote:
The guide says "All you have to do is put your audio into "audioToPlay". What would be the appropriate way to do it? I have a NSData with the audio.

Thank you very much!


Reply to this email directly or view it on GitHub.

from novocaine.

Rjonhson avatar Rjonhson commented on August 30, 2024

My audio is coming from an udp socket, so I didn't have many options I guess(as far as my limited knowledge goes)

Thanks for the link, I am going to try it out!

from novocaine.

alexbw avatar alexbw commented on August 30, 2024

Best of luck!

On Oct 17, 2013, at 10:48 PM, Rjonhson [email protected] wrote:

My audio is coming from an udp socket, so I didn't have many options I guess(as far as my limited knowledge goes)

Thanks for the link, I am going to try it out!


Reply to this email directly or view it on GitHub.

from novocaine.

Rjonhson avatar Rjonhson commented on August 30, 2024

Sorry for bothering, hopefully it is trivial enough so you can help me.

I got my array of ints from my NSData. But can't put it into audioToPlay

for (int i = 0; i < numFrames * thisNumChannels; i++) {
     audioToPlay[i] = ?
}

Thank you once again!

from novocaine.

alexbw avatar alexbw commented on August 30, 2024

If your data is a single channel, then

for (int i=0; i < numFrames) {
for (int iChannel=0; i < numChannels) {

audioToPlay[i*iChannel] = audio_array[i]

}
}

But it will definitely depend on the format of your audio.

As a future reference, these types of question depend more on managing C
arrays, and wrangling NSData from Objective-C, and I think you'll find much
quicker and more in-depth answers at StackOverflow.

On Thu, Oct 17, 2013 at 11:05 PM, Rjonhson [email protected] wrote:

Sorry for bothering, hopefully it is trivial enough so you can help me.

I got my array of ints from my NSData. But can't put it into audioToPlay

for (int i = 0; i < numFrames * thisNumChannels; i++) {
audioToPlay = ?
}

Thank you once again!


Reply to this email directly or view it on GitHubhttps://github.com//issues/63#issuecomment-26569384
.

from novocaine.

partho-maple avatar partho-maple commented on August 30, 2024

I had a question on this and i have already posted it here. But nobody is replying me.

Would you please take a look at this question ? >> #61

from novocaine.

alexbw avatar alexbw commented on August 30, 2024

@partho-maple, this question is more suited for StackOverflow, since it is not a bug in Novocaine, but a more general programming question. If you tag the question with "novocaine" and "obj-c" and "ios", many more users will be able to see the question and help you there, since not many people watch the issues here.

from novocaine.

partho-maple avatar partho-maple commented on August 30, 2024

@alexbw I have already posted it on Stackoverflow about 14 days ago from now but nobody had replied that. This is the link >> http://stackoverflow.com/questions/19212699/how-to-change-input-and-output-audio-settings-of-novocaine-project

WOuld you like to take a look and answer it ?

from novocaine.

Related Issues (20)

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.