Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
19 user(s) are online (14 user(s) are browsing Forums)

Members: 0
Guests: 19

more...

Support us!

Headlines

Forum Index


Board index » All Posts (broadblues)




Re: Redirect STDERR and STDOUT to the same file
Home away from home
Home away from home


In the absense of a proper solution to redirection STderr to Stdout, what you really need is a custom PIPE: that has two inputs amd one output that can mux the output into a single stream.

Go to top


Re: Redirect STDERR and STDOUT to the same file
Home away from home
Home away from home


"&>"

Don't name it that

Weirldy named commands will only cause issues.

Go to top


Re: Redirect STDERR and STDOUT to the same file
Home away from home
Home away from home


The core problem with using the syntax

Command >ram:log *>>ram:log

is that you now have two streams writing to the same file. Neither stream knows what the other has written, so parts of the output will be overwritten.

To expand your simple test above.

#include    <stdio.h>
int main()
{
    
fprintf(stdout,"STDOUT1\n");
    
fflush(stdout);
    
fprintf(stderr,"STDERR1\n");
    
fflush(stderr);
    
fprintf(stdout,"STDOUT2\n");
    
fflush(stdout);
    
fprintf(stderr,"STDERR2\n");
    
fflush(stderr);
    
fprintf(stdout,"STDOUT3\n");
    
fflush(stdout);
    return 
0;
}


9.AmigaOS4:> gcc -o ram:testit test.
9.AmigaOS4
:> ram:testit  >RAM:LOG *>>RAM:LOG
9.AmigaOS4
:> type ram:LOG 
STDERR1
STDERR2
STDOUT3


You need to redirect stderr to stdouts stream. Not 100% sure if you can do that at the shell level.

Historicaly in AmigaDOS pre AmigaOS 4 shells STDERR and STDOUT were the same stream so no extra sysntax would be needed.

Go to top


Re: SObjs libmng.so.1 is missing, required by 8SVX datatype.
Home away from home
Home away from home


sounds like your MNG.datatype descriptor has matched against some of your ordinary png files.

Multiviewer will display a GUI when displaying sound files that has png elements in it.

Go to top


Re: need clarify about libdl and all dlopen/dlclose calls
Home away from home
Home away from home


There is no libdl.a because under AmigaOS you cannot use the libdl functions if you are not using dynamic linking.

The SDK *should have* a link to libdl.so (in SDK:local/newlib/lib) though to enable linking of programs that use it. A copy of the file will work as well but is then at risk of going out of sync with the installed version.

Go to top


Re: SVG Datatype
Home away from home
Home away from home


@Raziel

SVG support for icons is not 100% a bad idea but

Quote:

detail


You would in fact lose the details of hand drawn pixel based icons as vector graphics is not suited to that, it's good at logos text and shape based gfx.

Compare dull android icons and emojis to the subtletiess of the icons sets create by Mason

A matter of taste though perhaps

Go to top


Re: Last Chance: AmigaOS 4.x hardware vs emulation survey
Home away from home
Home away from home


@geennaam

Quote:

And some drivers seem open source but still need a binary component. Like the ARM MALI drivers for example.


Later MALI chipsets well work with the PanFrost drivers, need quite a recent kernel though

Go to top


Re: ImageFx 4.1 crashes with debug kernel
Home away from home
Home away from home


I have to agree with Joerg and Tony here, attempting to traverse a list whilst modifying it has always been a bad coding behaviour, and the fact you could get away withit was just "luck". Try it with a C++ list where the equivalent node structiue is fully encapsulated and bad stuff will happen if you don't do it the right way.

But as regards to backward compatabilty, the crash is only enforced with the debug kernal, which is for developers and debugging and should not generally be used by end users.

Go to top


Re: The ADTOOLS thread
Home away from home
Home away from home


@rjd324

Quote:

Using Printf from DOS worked and I updated the repository.

The test for STATIC NEWLIB with my public elf.library continues to show the second constructor not being called.


Use Objdump or similar to verify the constructor array doesn't not have any NULLs in it.

The constructor calling code, assumes the array is terminated at both ends by a NULL pointer, but in some unusual cases there can be NULL in the middle which messes it up.

good:

NULL
Const1
Const2
NULL

bad:

NULL
Const1
NULL
Const2
NULL

Go to top


Re: PPaint OS4 questions
Home away from home
Home away from home


@xe1huku


It's fully native PPC port.

You can't hide the extra gadgets, they will grow on you You can hide *all* the gadgets though by pressing F9 (show them again by pressing again).

Go to top


Re: Anyone have success using Audio Evolution 4?
Home away from home
Home away from home


@geennaam

Quote:

Quote:

That what I guestimated based on the numbers given by Hans

Audio frames != buffer sizes.


Quite, I was working in frames....

Quote:

Quote:

From reading ahisrc, the hooks provided by the app get called as part of the hooks passed to the driver, even if the driver doesn't care about specifics.

The buffer is probably / possibly the same size though.


I don't agree:
- A 16bit HIFI mode takes 16bit samples in and always supplies 32bit mixing buffer to the driver
- AHI has to do resampling (and expand or shrink the buffer) when there is a mismatch between "audiomode frequency" and "input sample frequency" .
- The application can determine its own buffer size as input to AHI as long as it is equal or larger to the value returned by AllocAdio() AHIDB_MaxPlaySamples tag.


Again I'm thinking in frames, your right the samples would likely get upgraded to 32bit for many drivers


Quote:

Quote:

Aha! I think this is the issue. AE will be setting the procesing frequency via AHIA_PlayerFreq and expecting the EffectOutputBuffer callback to be caled in sync with that, but your driver has forced AHI to process the data at a faster frequency due to the needs of the PCIe DMA resultng in the callback being called more often and thus it pushes the timer bar on faster than expected.


I don't know what the EffectOutputBuffer is. Is this the 16bit stereo sample buffer provided by AE4 to AHI?



No it's a buffer provided back to the application by AHI containing the final mix data, to enable it to implement VUs etc.

AE4 is using it for that purpose but also to 'count' the data finally written to the sound card.

Quote:

Anyways, it indeed looks like AE4 is making wrong assumptions again:
- AHIA_PlayerFreq tag determines the frequency of application buffers supplied to AHI based on the following formula:

"Application buffer size" >= "driver buffer size" * "sample frequency" / "audiomode frequency"

AHIA_PlayerFreq = "sample frequency" / "Application buffer size"

So AHIA_PlayerFreq determines the rate at which frame buffers going into AHI. The wrong assumption by AE4 is that frame buffers will exit AHI to the driver at the same rate.

This could be the case when the driver relies on timing provided by AHI. In case of a "sample frequency" and "audio mode frequency" mismatch, AHI could resample and adjust buffer size to the driver but keep the buffer rate to the driver the same. So effectively the application is providing timing to the driver instead of AHI. And the driver needs to adapt it's own timing base on provided buffer sizes.

But in case of my driver, the audio hardware determines the buffer output rate:
If the sample frequency and audiomode frequency are both 48kHz then the minimum application buffer must be 1024*48kHz/48kHz = 1024. If the AE4 application buffer is set to 2000 than the player frequency is set to 48000/2000 = 24Hz. But my driver requests data from AHI at 48000/1024 = 46.875Hz. So if the AE4 cursor somehow counts how many times data is going out to the driver and compares this the value of the AHIA_PlayerFreq tag then the cursor will play at almost twice the speed in this example.


Er yes, that's roughly what I said above (with more technical details ) .

A possible solution without too much redesign of AE4 is to check the number of frames passed back in the hook and calculate from there.

I'd be interested to know how you set up the driver based timing, as I have virtual driver project (that sent audio data to HDRecs mixer from external apps) that I could get to play but was always broken audio, probably because of timeing mismatches.

Quote:

Quote:

If a solution can be found, then I could ask if an update could be made. He might say no though....

Maybe you can only ask one question: When will you make the source available as you've announced in the AE4 readme on os4depot.


Don't know why he never released it. Perhaps because it was incomplete and didn't build. (I've regenerated the bits that were missing). Maye he just chnaged his mind

Go to top


Re: Anyone have success using Audio Evolution 4?
Home away from home
Home away from home


@Hans

Quote:

At broadblues' suggestion, I tried changing AE4's sample buffer size (Options=>Preferences=>Performance), and it affects where the cursor ends after playback. Dropping it down to 1 extends the end position to 25.5 seconds. Putting it back to 10 returns it to the original ~24.7 seconds.


That was less of a change than I originally expected, with my new logic above it shouldn't change much at all, but the changes could just be down to the number of whole buffers that get processed.

Quote:

Anyway, once we figure out what AE4 is doing, perhaps we could update the ahi.device to hide the driver differences. I know it uses the low-level API but it shouldn't be so low-level that the application needs to know the mixing method.


I think it must already as otherwise AE4 wouldn't be playing back smoothly, it's just this particular side effect of the rate the effectoutputbufferhook callback is called that can't be.
(If I'm right).

Quote:

Alternatively, does anyone still have contact with Davy?


Actually yes, I have. Albeit very occasional. Usually in the context of the android AE5.

In fact I have had the AE4 source for about 6 months or so, but didn't want to say in public earlier as it's on a strictly personal use, ask Davy no questions about it, basis. I didn't want to mention this earlier as I didn't want to abuse the special favour he gave me in sharing it, better to reply usiong the publicly availabe AE3 src as reference. (This aspect is the same, although the hook itself is more sophisticated).

If a solution can be found, then I could ask if an update could be made. He might say no though....

Go to top


Re: Anyone have success using Audio Evolution 4?
Home away from home
Home away from home


@geennaam

Quote:

Similar to recording, the playback sample buffer has to be requested by the application as well.


Quote:

In my case always 1024 audio frames.


That what I guestimated based on the numbers given by Hans

Quote:

All HOOKs are supplied by the AHI device with the AHIAudioCtrlDrv structure. So no specific flags or function calls from the application.


From reading ahisrc, the hooks provided by the app get called as part of the hooks passed to the driver, even if the driver doesn't care about specifics.

Quote:

I don't think that the application hook and mixing hook point to the same buffer because AHI has to do some mixing first before the audio data is presented to the driver.


The buffer is probably / possibly the same size though.

Quote:
[snip]. So no multiple calls to the same buffer.


OK so you aren't looping over the hook multiple times per buffer.

Quote:

My driver works in a different way compared to other drivers. I do not use mixing routines with timing provided by AHI. Instead, the audio hardware determines the timing. This is the only correct way to feed PCIe DMA busmasters.
FLAGs are correctly returned in AHIsub_AllocAudio so AHI is aware of the diver running in this mode.


Aha! I think this is the issue. AE will be setting the procesing frequency via AHIA_PlayerFreq and expecting the EffectOutputBuffer callback to be caled in sync with that, but your driver has forced AHI to process the data at a faster frequency due to the needs of the PCIe DMA resultng in the callback being called more often and thus it pushes the timer bar on faster than expected.

I don't see how you can reasonably fix that at the driver end.

Quote:

After all, Recording and playback works just fine. I have double checked the AE4 behavior and when I record for 5 seconds, it also displays a 5 seconds sample. It is just that the playback marker plays at almost twice the speed and stops almost twice the length of the recorded sample But both recorded sound and playback are fine audio wise.


I'm not sure what consequences the time marker being in the wrong place has.

Editing the sample at specific places will be harder, though when you move the cursor it will start playing from the correct place.

It might ot might not affect automation timing.

It possibly will affect punch in punch out recording, start and stop times.

One work arround might be to record parts with the direct driver, then edit after the fact with the audio.device drivers (UNIT 0: in the AHI mode requester of AE4) you would be limited to 44.1 or 48 KHz though. Which is usually OK anyway.

Go to top


Re: Anyone have success using Audio Evolution 4?
Home away from home
Home away from home


@geennaam

Quote:

I don't handle this. It is part of ahi.h (device stuff) and not ahi_sub.h (driver stuff). So it is only something between the application and the AHI device.


Well you kind of do in so much as the hook is called as part of the AudioCtrl->ahiac_MixerFunc hook that you presumably call from your driver at some point, else AE wouldn't be advancing at all, neither would the VUs in master slider be updating.

It looks like you may be calling that inside your loop for processing submitted data rather than just once per submision, I may be wrong, ofcourse, I just gessing based on apparent side effects.

Quote:

The application has to call AHI_GetAudioAttr( AHIDB_AHIDB_MaxRecordSamples, pBufferLenght ).


That's for recording. AE does call that and set the buffers to the right size, but that'snot the issue here.

Go to top


Re: Blog Post and Video about NetRexx - Share Amiga ARexx Ports over the network.
Home away from home
Home away from home


Thinking of KingFisher

King -> Rexx
Fisher -> Net

Bad pun but ....

Go to top


Re: Anyone have success using Audio Evolution 4?
Home away from home
Home away from home


@geennaam

Digging through the AHISrc it seems you wouldn't be calling it direct but via the
AudioCtrl->ahiac_MixerFunc hook.

Could you be calling that more than once per block of submitted data?

Go to top


Re: Anyone have success using Audio Evolution 4?
Home away from home
Home away from home


@Hans

Quote:

Quote:

So the sample recorded by AE4 appears twice as long? What exactly do you mean by that? It seems odd especially as you mentioned the sample actually played correctly.

It's not exactly 2x. My test sample is ~14.3 seconds long, and the playback cursor ends at ~24.7.


Hmm slightly less than 2 x is odd, I would expect it to be slghtly over or exact.

Quote:

Quote:

If you "master" the project does it play the project in sync? This uses the filesave driver so should eliminate driver incompabilty issues.

The playback cursor stops at the end of the sample, so I guess that it is "in-sync."


OK so it does seem that the out of sync is driver related then, because filesave works as expected.

@geennaam

How does your driver handle the AHIET_OUTPUTBUFFER effect?
Could there be any reason why the block size handled there would be different from that being passed in by AE4 in the playback hook?

If that seems a cryptic question, that's how the AE3 src drives the blockcount and thus the progress of the timebar etc.


Edited by broadblues on 2023/1/3 12:17:03
Go to top


Re: Anyone have success using Audio Evolution 4?
Home away from home
Home away from home


@geennaam

I'd also give option2 the thumbs up, especially as there seems to be no way for the lowlevl API to request a given sample format.

Quote:

I can also record undistorted sounds in AE4 now. But unlike HD-rec, AE4 still thinks that a sample is almost twice as long. This is also still the case for imported 16bit AIFF samples that were created with AHIrecord. And while AE4 looks like a nice program, I do not plan to fix all bad programming.


So the sample recorded by AE4 appears twice as long? What exactly do you mean by that? It seems odd especially as you mentioned the sample actually played correctly.

@Hans

If you "master" the project does it play the project in sync? This uses the filesave driver so should eliminate driver incompabilty issues.

I'm thinking the 'playback cursor' is advanced based on how many samples played (it's not time related as such as when mastering the progress is as fast as the CPU can go.)

Go to top


Re: Anyone have success using Audio Evolution 4?
Home away from home
Home away from home


@geennaam

The archive on aminet might be labeled 6.0 release but the version of the ahi.device code contained within is 6.6 (I just double checked). Versions and build dates match with the OS4 bundled ones.

You may well be right that the Filesave driver needs further modification for OS4, no idea where the modified src might be, if so.

I just tried to build it from the src in the aminet archive, lots of warning, it gets to link stage, but fails, but the failures are all related to DOS deprecations and one Newlib related one. As the version numbers match I suspect it is the origial src, just that the compiler and SDK have moved on in the last 17 (!) years and made it troublesome to build.

fd2pragma can deal with sfd files IIRC. Though it's pain to have to do so.

Go to top


Re: Anyone have success using Audio Evolution 4?
Home away from home
Home away from home


@geennaam

Quote:

So based on this, the sources for the modified OS4 AHI version should be available.


I don't think the AmigaOS4 version of AHI 6 is modified in any way. As far as I know (might be wrong but 95% sure) it's straight "port".

Only the example drivers are (L)GPL though, so unfrtunatly sources of the various other drivers aren't freely available.

Go to top



TopTop
« 1 2 (3) 4 5 6 ... 108 »




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project