Skip to content
Snippets Groups Projects
Commit 6716fef1 authored by Rafaël Carré's avatar Rafaël Carré
Browse files

malloc/free -> new/delete

parent 44f0d4ea
No related branches found
No related tags found
No related merge requests found
...@@ -200,7 +200,7 @@ AudioStream::createStream (pa_context* c, std::string *deviceName) ...@@ -200,7 +200,7 @@ AudioStream::createStream (pa_context* c, std::string *deviceName)
_info ("Audio: Create pulseaudio stream: %d", _sample_spec.rate); _info ("Audio: Create pulseaudio stream: %d", _sample_spec.rate);
pa_buffer_attr* attributes = (pa_buffer_attr*) malloc (sizeof (pa_buffer_attr)); pa_buffer_attr* attributes = new pa_buffer_attr;
if (! (s = pa_stream_new (c, _streamDescription.c_str() , &_sample_spec, &channel_map))) if (! (s = pa_stream_new (c, _streamDescription.c_str() , &_sample_spec, &channel_map)))
...@@ -270,7 +270,7 @@ AudioStream::createStream (pa_context* c, std::string *deviceName) ...@@ -270,7 +270,7 @@ AudioStream::createStream (pa_context* c, std::string *deviceName)
pa_stream_set_state_callback (s , stream_state_callback, _mainloop); pa_stream_set_state_callback (s , stream_state_callback, _mainloop);
free (attributes); delete attributes;
return s; return s;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment