How do I integrate an Audio Unit to an app - cocoa

How do I integrate an audio unit into an application. I may not be familiar with the concept of components. I can open them in AUlab but I want to use it with a main.

Programming an AudioUnit host is a good amount of work. A couple of resources to get you started:
The Core Audio Overview has a section on Hosting which scratches the surface of what you need to learn. I would start by reading the entire guide, and examining the provied sample code.
Also, check out the ardour code base for some example code on how they host audio units in their application.

This is not a trivial question. You have a fair amount of work ahead of you.
Start here with the Apple documentation.
You will need to learn to configure CoreAudio, and then build AU "graphs".

Related

ESP32 IDF Ble Gatt Server Example

I am trying to use esp32 IoT development framework. It is a bit complicated for me especially BLE examples. I am trying to understand gatts_service_table example but it has huge code inside and too hard for the first BLE APP. Is there any simple Ble example on IDF? I know kolbans libraries and I tried that but my aim is IDF. But to learn IDF I have to improve my programming skills first.
I want to create a profile. After add service inside, and characteristic. After creating my BLE architecture, send receive data with a phone app.
BLE looks simple from the user's point-of-view but is quite complex under the hood. It took me several months to wrap my head around it.
This example is organized much better than the example from Espressif (BlueDroid-based, it's what I'm using in my product):
https://github.com/eagi223/esp-idf_Bluetooth_Multi-Service
(vs. the Espressif example: https://github.com/espressif/esp-idf/tree/master/examples/bluetooth/bluedroid/ble/gatt_server_service_table )
BTW, Now NimBLE is available in ESP-IDF 4+, which is supposed to be more memory efficient and simple to use, but I haven't tried it yet. https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/bluetooth/nimble/index.html
The examples of nimble ble given in espressif documents are quite difficult to follow. It took me some time to understand nimble BLE use with esp32. After referring many other sources, I finally succeeded in its use.
So I have written a tutorial which I think is easier to follow than examples given in espressif documents.
https://github.com/Zeni241/ESP32-NimbleBLE-For-Dummies
Hope it will help someone.

First Windows driver development exercise: dev/random or dev/null?

What follows is really a learning exercise and not necessarily a search for a production solution. I've recently done a bunch of reading about Windows driver development and am looking for a first good exercise in practical application before potentially proceeding toward a future win10 mobile device family project.
Just to get my feet wet with win10 driver development, I was thinking it would be interesting to develop (and then publish) a filesystem driver project that implemented a dumb Windows equivalent of /dev/null or /dev/random - really, any virtual device that I can read a stream of data from.
I haven't done much Windows development in the past, but after reading through a couple books on Safari I've landed on MS's driver samples GitHub page, which seems like a good start, but doesn't seem to provide a clear way forward from what I've read so far.
Right now I'm still casting about with web searches and would sure appreciate some guidance in how to proceed toward this goal (references, reading materials, etc) I'll be happy to publish whatever silly project(s) I wind up generating for others to learn from in the future.
One of the best way to start Windows driver development is with toaster sample . It will provide you basic workable understanding of Windows driver development. You will be able to understand basics for writing bus driver, function driver and filter drivers(upper, lower) in Windows.

Windows Phone 7 Application Code Obfuscation

About to complete a wp7 application, which uses bing map services for locations etc. I need to know if obfuscation will hamper its performance.
There are some tools available like Dotfuscator etc, but concerned about the performance of the app. Please give your suggestions
I do not have much experience with obfuscation, however what I do know is there are two methods.
Simply renaming of variables and functions to make it difficult to read the logic when decompiled using Reflector; and
The other where program flow is be rearranged.
With name obfuscation the IL code and runtime performance is the same. There is apparently a difference in performance with the second method, however the only benchmarks/articles I can find are for Java.
You are deploying to a secure device and file system so there is no need to obfuscate a WP7 application. As Chris pointed out, you can actually get the application package file by intercepting the HTTP request from the marketplace and extracting the GUID as detailed in a blog post by Marius Gheorghe. As Marius explains this is because the XML stream is not encrypted and that the assembly package can be retrieved using a simple request. I would expect Microsoft to patch/fix this soon (and I will mention it to our Microsoft account manager).
As for WP7 obfuscation there is a detailed blog post here that should help.
...
If you want to secure your application, I would spent the time encrypting your persisted data (i.e. save files) so that your users data is secure. That is what did for the WP7 Full House Poker game.
There is only one way to be sure: you should test.
Obfuscation will probably not impact performance much but, again, you should test.
EDIT
Before you obfuscate, do realize that obfuscation is not the same as encryption. Never store any secrets in your client side code!
Performance is hampered but ignorable if you measure in milliseconds, the bottom line is that you may do not obfuscate if you are creating a free application or open source.

What are some methodologies that a solo developer should use while creating cocoa programs?

I have recently started learning cocoa development with a fairly large scale(probably Core Data based) application in mind as my goal. I have been looking into development methodologies that would be used to help build a higher quality product with better code and although I have found a couple that I am sure I would like to use, such as version control(probably with git) there are some others like unit testing that seem like they would be hard to use when the majority of the application is written with IB and Core Data. I would really appreciate some suggestions as to what tools or workflow methods a solo developer should be using.
Thanks.
P.S. First post in SO!
EDIT: By the way I primarily plan to develop for OS X and not the iPhone.
welcome to SO :-)
One thing I struggle with as a solo dev is discipline...!
Always comment, test, design ahead if you want to increase the quality of your code, reduce the amount of times you re-write something until your interfaces/class structure actually works, and have code that you can come back to in a years time and know what you mean!
Apple have a great guide for Unit Testing
As of iOS 4, Apple have added a UIAutomation framework for testing the User Interface of apps.
O'Reilly has a guide here, and you may want to have a peak at Apple's official documentation for UIAutomation
Its fairly new, but it won't hurt to take a look at it.
There has also been a query on SO about automated testing of iPhone apps.
Our own Chris Hanson did a series of posts about Cocoa and Unit Testing. It isn't as difficult as you think.
use git, it makes it really easy to go back to prior versions
comment your code, as others mentioned you'll need to look at it years later and understand it
get in the habit of building yourself reusable classes. Many tasks you perform when developing will need to be duplicated in other projects
expect that no matter how diligent your try to be, your users will have problems. As such you have to develop a methodology of allowing your customers to report their errors to you that is useful. I recently implemented this for myself. It's basically a way to get meaningful stack traces back from users through email. I learned this here.

How to implement a voice changer?

I want to write a app which change the microphone input voice and make it like robot or some funny man's voice.It must support send changed voice to all application like IM Software or Game Client. Which technology should I pick up? Windows WaveForm Api? DirectX?
audio driver?
Thank you very much!
There's an MSDN Coding4Fun article that explains how to create a voice changer that operates over Skype, in C# (.NET). The full source code is also hosted as a project on CodePlex. In addition, it should be fairly easy do something else with the audio (as opposed to streaming it via Skype), since the project is based around the NAudio framework, which contains a good level of abstraction. Anyway, it is a reasonably complete (and stable) example - definitely worth checking out in my opinion.
If you want/need to use C++ or some other language for development, then this project should at least give you some ideas about how to go about it. Still, if you can use .NET, then you're in luck I think.
Robot voice is often done with a ring modulator effect, mixing the voice with a sine wave - this is easier. Or use a vocoder effect, modulating the voice onto some other waveform, like rectangle - might be a bit more tricky. Go read up how the effects work, get a program with which you can check out how they sound (Audacity works for the ring modulator, finding and using a vocoder may be a bit harder). Then read how it's done or get a library which will do the processing for you.
You are looking to support VSTi or DXi plugins.
There are tons that also act as vocoders, even for free.
You just need to write the host application.
Take a look here :)
Now that's a neat idea, especially for a mobile app.
I'd probably start off-line by using a .wav file as input to get the effects working the way I wanted. You can use any high level language for this, but you probably want something that will map reasonably well into C/C++.
In terms of a production version, I'd go native and do this in C or C++. You want something fast for real time audio processing & I like to avoid dependencies on things like .net for distribution. (Not that I have anything against .net, it's great for servers and distribution within a company but I'm not so keen on having it as a dependency for shrink wrap software.)
Windows DirectShow would be a tempting option - you could do some interesting effects with multi-media as well if you had the voice morpher implemented as a direct show filter.
What you're looking for is a vocoder. I don't know if any of the technologies listed above has a vocoder effect, but the best chance would be with DirectX.
Try this sample app .I think its useful to you.Link

Resources