| 614 | } |
| 615 | |
| 616 | void setPlaybackSpeed(int ratioDiff) |
| 617 | { |
| 618 | if (g_Player.IsValid()) |
| 619 | { |
| 620 | XnDouble dNewSpeed = g_Player.GetPlaybackSpeed() * pow(2.0, (XnDouble)ratioDiff); |
| 621 | XnStatus nRetVal = g_Player.SetPlaybackSpeed(dNewSpeed); |
| 622 | if (nRetVal != XN_STATUS_OK) |
| 623 | { |
| 624 | displayMessage("Failed to set playback speed: %s", xnGetStatusString(nRetVal)); |
| 625 | } |
| 626 | } |
| 627 | else |
| 628 | { |
| 629 | displayMessage("Can't set playback speed - input is not a recording!"); |
| 630 | } |
| 631 | } |
| 632 | |
| 633 | XnDouble getPlaybackSpeed() |
| 634 | { |
nothing calls this directly
no test coverage detected