# HG changeset patch # User Mike Miller # Date 1424537621 18000 # Node ID 879cff0c05dcf6bd8db596d14145988dbaf5dae7 # Parent f9ca80482c41c919855f48333fee86ce457e12e1 audiowrite: Accept a row vector input as a single channel * audioread.cc (Faudiowrite): Accept a row vector input as a single channel. diff -r f9ca80482c41 -r 879cff0c05dc libinterp/dldfcn/audioread.cc --- a/libinterp/dldfcn/audioread.cc Sat Feb 21 11:31:55 2015 -0500 +++ b/libinterp/dldfcn/audioread.cc Sat Feb 21 11:53:41 2015 -0500 @@ -306,7 +306,7 @@ if (error_state) return retval; - const Matrix audio = args(1).matrix_value (); + Matrix audio = args(1).matrix_value (); if (error_state) return retval; @@ -336,6 +336,9 @@ sf_count_t items_to_write = audio.rows () * audio.columns (); + if (audio.rows () == 1) + audio = audio.transpose (); + OCTAVE_LOCAL_BUFFER (float, data, items_to_write); sf_count_t idx = 0;