@@ -498,7 +498,7 @@ HDF5RecordingData::HDF5RecordingData(DataSet* data)
498498 this ->size [2 ] = 1 ;
499499
500500 this ->xChunkSize = chunk[0 ];
501- this ->xPos = dims[ 0 ] ;
501+ this ->xPos = 0 ;
502502 this ->dSet = dataSet;
503503 this ->rowXPos .clear ();
504504 this ->rowXPos .insertMultiple (0 ,0 ,this ->size [1 ]);
@@ -663,6 +663,8 @@ void KWDFile::startNewRecording(int recordingNumber, int nChannels, HDF5Recordin
663663 this ->multiSample = info->multiSample ;
664664 uint8 mSample = info->multiSample ? 1 : 0 ;
665665
666+ ScopedPointer<HDF5RecordingData> bitVoltsSet;
667+
666668 String recordPath = String (" /recordings/" )+String (recordingNumber);
667669 CHECK_ERROR (createGroup (recordPath));
668670 CHECK_ERROR (setAttributeStr (info->name ,recordPath,String (" name" )));
@@ -671,7 +673,10 @@ void KWDFile::startNewRecording(int recordingNumber, int nChannels, HDF5Recordin
671673 CHECK_ERROR (setAttribute (F32,&(info->sample_rate ),recordPath,String (" sample_rate" )));
672674 CHECK_ERROR (setAttribute (U32,&(info->bit_depth ),recordPath,String (" bit_depth" )));
673675 CHECK_ERROR (createGroup (recordPath+" /application_data" ));
674- CHECK_ERROR (setAttributeArray (F32,info->bitVolts .getRawDataPointer (),info->bitVolts .size (),recordPath+" /application_data" ,String (" channel_bit_volts" )));
676+ // CHECK_ERROR(setAttributeArray(F32,info->bitVolts.getRawDataPointer(),info->bitVolts.size(),recordPath+"/application_data",String("channel_bit_volts")));
677+ bitVoltsSet = createDataSet (F32, info->bitVolts .size (), 0 , recordPath + " /application_data/channel_bit_volts" );
678+ bitVoltsSet->writeDataBlock (info->bitVolts .size (), F32, info->bitVolts .getRawDataPointer ());
679+
675680 CHECK_ERROR (setAttribute (U8,&mSample ,recordPath+" /application_data" ,String (" is_multiSampleRate_data" )));
676681 CHECK_ERROR (setAttributeArray (F32,info->channelSampleRates .getRawDataPointer (),info->channelSampleRates .size (),recordPath+" /application_data" ,String (" channel_sample_rates" )));
677682 recdata = createDataSet (I16,0 ,nChannels,CHUNK_XSIZE,recordPath+" /data" );
0 commit comments