# Cinder-Csound block

**URL:** <https://discourse.libcinder.org/t/cinder-csound-block/1237>\
**Category:** CinderBlocks\
**Created:** [August 6, 2018, 3:35am UTC](https://discourse.libcinder.org/t/cinder-csound-block/1237 "2018-08-06T03:35:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Malfunkn](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/malfunkn/32/761_2.png) [@Malfunkn](https://discourse.libcinder.org/u/Malfunkn)\
**Post date:** [August 6, 2018, 3:35am UTC](https://discourse.libcinder.org/t/cinder-csound-block/1237/1 "2018-08-06T03:35:25Z")

</div>

I’ve finally successfully built a csound api wrapper block for cinder in OSX  
I recycled code from the ofxCsound addon.  
You can get the csound cinderblock here: [https://github.com/earjuice/Cinder-Csound](https://github.com/earjuice/Cinder-Csound)

install csound  
Use the tinderbox csound template  
drag the csound framework and csound dylib into xcode and it should work.

I’d like to get the linking working from the cinderblock.xml properly and I could use some help with the msw cinderblock.xml too. Not sure hot to use csound’s .dll/.lib windows equivalent. Any help would be great. Cheers.

---

<div class="post-metadata">

**Author:** ![lithium](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/lithium/32/38_2.png) [@lithium](https://discourse.libcinder.org/u/lithium)\
**Post date:** [August 6, 2018, 5:40am UTC](https://discourse.libcinder.org/t/cinder-csound-block/1237/2 "2018-08-06T05:40:59Z")

</div>

Definitely off to a good start, but you’re leaking `CPPSound` objects. You should look into using `std::unique_ptr<>` rather than using raw `new` and `delete`. Also it’s generally a bad idea to have `using namespace std` in a header file. It pollutes the global namespace and can wreak havoc between certain libraries.

---

<div class="post-metadata">

**Author:** ![Malfunkn](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/malfunkn/32/761_2.png) [@Malfunkn](https://discourse.libcinder.org/u/Malfunkn)\
**Post date:** [August 6, 2018, 11:29pm UTC](https://discourse.libcinder.org/t/cinder-csound-block/1237/3 "2018-08-06T23:29:02Z")

</div>

Awesome! Thanks for finding those. It’s okay to use shared\_ptr right?  
I still can’t figure out how to load the libraries properly in osx and msw using the cinderblock.xml…
