Codebase list libgdf / f0bacc9
added patch up_cp-ev-channel to "cherry-pick" f309cc6c0ede3cf3cded1cb26fd19958d3654402 (fixed event channel numbering in gdf_writer) Yaroslav Halchenko 12 years ago
2 changed file(s) with 24 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
00 up_cp-ev
1 up_cp-ev-channel
0 --- a/matlab/gdf_writer.cpp
1 +++ b/matlab/gdf_writer.cpp
2 @@ -195,9 +195,9 @@ void CMD_newsignal::execute( mxArray *pl
3 w->createSignal( channel, true );
4 plhs[0] = mxCreateNumericMatrix( 1, 1, mxUINT64_CLASS, mxREAL );
5 *reinterpret_cast<size_t*>(mxGetData( plhs[0] )) = channel + 1;
6 -
7 +
8 w->getSignalHeader(channel).set_datatype( type );
9 - w->getSignalHeader(channel).set_samplerate( fs );
10 + w->getSignalHeader(channel).set_samplerate( fs );
11 }
12
13 void CMD_recduration::execute( mxArray ** /*plhs[]*/, const mxArray *prhs[] )
14 @@ -294,7 +294,7 @@ void CMD_mode3event::execute( mxArray **
15 gdf::uint16 type = mx::getNumeric<gdf::uint16>( prhs[2] );
16 gdf::uint16 chan = mx::getNumeric<gdf::uint16>( prhs[3] );
17 gdf::uint32 dur = mx::getNumeric<gdf::uint32>( prhs[4] );
18 - w->addEvent( pos, type, chan-1, dur );
19 + w->addEvent( pos, type, chan, dur );
20 }
21
22 void CMD_open::execute( mxArray ** /*plhs*/, const mxArray *prhs[] )