The ancient Aztecs used the whistle as a battle cry that guaranteed victory so that their enemies would flee immediately.
In the 1990s, archaeologists in Mexico City unearthed a 500-year-old skeleton in front of the Ehecatl Tlatelolco temple. He was sacrificed and was holding two small whistles, one in the shape of a skull.

When the explorer blew one of the tiny whistles, terrifying sounds echoed throughout the area..
One scientist described this sound as "the scream of death."
This find suggests that the whistles are associated with Ehecatl (wind) and Miktlantecutli (death), and they may be associated with the ritual of sacrifice.

The terrible, shrill sound of a whistle is perhaps the most similar to a human scream. Various air currents are formed in the structure of these instruments, which then collide diametrically with each other.

Aztec warriors were famous for beating wooden drums as they went into battle. They could also blow those scary whistles.
You can imagine a frightening sound if you had 200 or 300 or 5000 warriors blowing these instruments. It would be very frightening.
Another theory suggests that whistling could have been used to provide comfort and induce trance as part of healing rituals rather than intimidation.

Unfortunately, the exact original use and purpose of the death whistle and many other ancient resonators have been lost.
There are several ancient whistles of death made from clay in museums and collections, but very few of them have been the subject of research.